All Questions
Tagged with sql sql-execution-plan
535
questions
62
votes
3
answers
222k
views
How do I view the Explain Plan in Oracle Sql developer?
I have few SQL queries which has very low query running performance and I want to check the query execution plan for this query. I am trying to execute the below query but its not showing any query ...
1
vote
1
answer
254
views
Big difference in Estimated and Actual rows when using a local variable
This is my first post on Stackoverflow so I hope I'm correctly following all protocols!
I'm struggling with a stored procedure in which I create a table variable and filling this table with an insert ...
0
votes
0
answers
46
views
Mysql select with WHERE (a, b) in (('str1', 'str2'), ...., ('str6000', 'str6000')) taking 30 seconds to execute
I have table of the following structure:
create table my_table
(
id int auto_increment
primary key,
name varchar(255) null,
vendor_name ...
2
votes
3
answers
2k
views
EXASOL Explain Analyse Query
I want to get the query plan in Exasol database to check the total execution time, memory and cpu usage. Profiling in Exasol is so complex and difficult to understand.
Is there any way to get the ...
6
votes
1
answer
424
views
How to see the execution plan of a multi-statement table valued function in SQL Server?
I have a view in SQL Server that calls a function. When I show the actual execution plan for querying the view, what happens inside the function is completely opaque though.
As a small example, I made ...
1
vote
0
answers
33
views
postgresql EXPLAIN gives seq scan rows = 12 for filter id < 10
I ran explain command on this query:
EXPLAIN
Select * from project_project where id < 10 FOR UPDATE
And the plan output:
"LockRows (cost=0.00..6.57 rows=12 width=18305)"
" -> ...
0
votes
1
answer
76
views
How to ensure use of an index?
I have the following query:
SELECT cp.ID_Case
FROM dbo.CaseParty cp (NOLOCK)
JOIN dbo.Client cli (NOLOCK) ON CASE
WHEN cli.ClientType = 'atty' AND cp.ID_ClientAttorney = cli.ID_Client THEN 1
...
1
vote
4
answers
3k
views
GCP BigQuery - LIMIT but full table read - How to limit queried data to a minimum
It looks like LIMIT would have no effect on the amount of processed/queried data (if you trust the UI).
SELECT
* --count(*)
FROM
`bigquery-public-data.github_repos.commits`
-- LIMIT 20
How to ...
1
vote
1
answer
96
views
How to get EXPLAIN output with a SELECT statement?
I'm trying to grab a query plan for my query. However, I do not have direct access to the db and can only run SELECT statements on my end.
Is there a way to wrap SELECT around EXPLAIN, maybe even ...
0
votes
3
answers
723
views
Indexing not working with column using range operations in oracle
I have created index on timestamp column for my table, but when I am querying and checking the explain plan in oracle it is doing the full table scan rather that range scan
Below is the DDL script for ...
0
votes
1
answer
45
views
Why is this Postgresql UPDATE statement so slow even when it doesn't update any rows? [closed]
I see that a full table scan is planned, however it's never executed and the UPDATE takes a long time anyway. Why??
Here's the EXPLAIN output
Update on public.hone_cohortuser (cost=3180.32..8951.51 ...
0
votes
0
answers
68
views
Adding a WHERE clause causes "Missing data for not-null field error" in CTE but not in temp table
I have a query where I am getting the distance for each point in my table (fields longitude and latitude) from a centroid using ST_Point and ST_DistanceSphere (below). If I want to filter the results ...
1
vote
1
answer
84
views
Efficient many-to-many embedding comparisons
I am trying to recommend a user the top "articles" given embeddings of "interests" they have.
Each "user" will have 5-10 embeddings associated with their profile, ...
9
votes
3
answers
73k
views
hash value for sql statement
When we execute any sql statement in Oracle, a hash value is being assigned to that sql statement and stored into the library cache. So, that later, if another user request the same query, then Oracle ...
10
votes
6
answers
18k
views
What is the "filtered" column in MySQL EXPLAIN telling me, and how can I make use of it?
The MySQL 5.7 documentation states:
The filtered column indicates an estimated percentage of table rows that will be filtered by the table condition. That is, rows shows the estimated number of ...