The tag has no wiki summary.

learn more… | top users | synonyms

1
vote
1answer
20 views

mariadb - EXPLAIN works but ANALYZE throws ERROR 1064 (42000) error in SQL syntax

I want to see the execution plan of a query to find out why it is slow, but ANALYZE does not seem to work, it throws an error on the same query that EXPLAIN accepts. MariaDB [dbx]> explain select ...
1
vote
2answers
40 views

Unit of COST in an Oracle execution plan

Is there a unit for cost in an Oracle execution plan? I mean if the cost of an operation is 50 then can I map this number to CPU cycles or utilisation percentage? What does this number stand for? Is ...
1
vote
1answer
33 views

Slow postgresql query with pagination and filtering

For the DB in question, I have followed the advice of Pagination Done the PostgreSQL Way That is, results are being paginated on a composite index with a definite sort order. Now, my problem is ...
0
votes
0answers
45 views

Explain plan shows a table not in the query

In trying to optimize a 2 minute query against an SAP R3 Oracle database, I examined the Explain Plan in Toad and found that most of the query's time is spent on a table that isn't even in the query. ...
0
votes
0answers
98 views

Oracle 11.2 Explain Plan takes too long

I'm using Oracle 11.2 SE on a 16GB Xeon E3 Linux machine as well as 11.2 XE on a 8GB i7 Win8 machine: SELECT banner FROM v$version: Oracle Database 11g Release 11.2.0.4.0 - 64bit Production PL/SQL ...
0
votes
1answer
16 views

Disc IO for query in MongoDB

is there a way to tell how much data MongoDB is reading from disc and how much from cache for a query ? I looked at the explain()-Function but did not find this kind of informations. Thanks, Andre
1
vote
0answers
116 views

sql query takes too long to execute [closed]

I am having trouble with this query. It takes 10 hours to execute. WITH CONSUM AS ( SELECT C.ID_MEASURER,C.ID_MEASURING_POINT,C.CONSUM_TYPE FROM GCGT_RE_CONSUM_H_E C WHERE C.DAY ...
2
votes
1answer
50 views

What is this view being used in my query?

I'm running EXPLAIN PLAN on this query: SELECT DISTINCT l.item_num, l.repl_code FROM item_w l JOIN item i ON l.item_num = i.item_num LEFT JOIN item_w r ON l.item_num = r.item_num AND l.repl_code = ...
1
vote
2answers
134 views

Can I get some rationale from the Optimzer why it chose a certain explain plan?

This is not about reading an explain plan. This is not about adding any hints or measuring performance of a specific query. I have always been wondering whether it's possible for a given explain ...
0
votes
2answers
43 views

Why search by date field requires engine to touch all records?

Why search by date field requires engine to touch all records? Is there any way to avoid it? Following query EXPLAIN select * FROM playdays where realdate>=Date('2010,01,01') ; shows that ...
3
votes
0answers
95 views

Why would function based indices I’ve created lower the cost but now show up in the explain plan breakdown?

Sorry for the terrible column/table names but since this is for a work project I wanted to insure it was ok to ask. I was just hoping to at least learn why I'm not seeing my functional indices being ...
1
vote
2answers
470 views

Very slow execution of a simple query

I try to create a report for my data, but it is really slow on a big table. The table structure is: CREATE TABLE posts ( id serial NOT NULL, project_id integer, moderation character ...
2
votes
1answer
54 views

Understanding postgres reason for picking this query plan

I ran a query: select * from orderline where orderid = 12345 and status > 0 that gave me the following plan: Bitmap Heap Scan on orderline (cost=286370.00..531410.78 rows=76372 width=155) ...
0
votes
0answers
159 views

MySQL: how to determine key_len and its role in performance improvement of a query

I have a query, below is the structure of the table: CREATE TABLE `jos_tag_rules_fields` ( `id` int(11) NOT NULL AUTO_INCREMENT, `name` varchar(255) NOT NULL DEFAULT '', `label` varchar(255) ...
1
vote
0answers
55 views

Oracle sql developer tree shaped represantation of Explain_Plan

I want to ask what exactly happens to the following Explain_Plan table : It firsts Joins the two tables Products & Order_Items then the output is joined with Orders and then with the ...
0
votes
1answer
108 views

Help interpreting a MySQL execution plan

I'm trying to understand a slow query. The SELECT has been running (at this moment) for almost 18000 seconds (output from a SELECT on PROCESSLIST): id: 22 time: 17870 ...
0
votes
2answers
302 views

Is there any manual for the visual explain in mysql? The output plan is unreadable

Just like this example, I cannot even tell the join ordering from it. And what does "ALL" and "ref" in the table mean? Is there any manual about the visual explain?
4
votes
2answers
3k views

Help to understand explain plan in Oracle

I am running a query in some big tables, and although it runs fine even tough is a lot of data, I'd like to understand what part of it weighs on the execution. Unfortunately I am not too good with ...
3
votes
1answer
560 views

Measuring the relative performance of queries given the assertion that “cost” isn't reliable

The cost field is a comparative cost that is used internally to determine the best cost for particular plans. The costs of different statements are not really directly comparable. Source Does ...
2
votes
1answer
185 views

Query results in a strange explain output

So I have a medium sized query that hits 15 tables. The query takes 36 sec on MySQL to complete. I ran EXPLAIN on the query and one of the tables returned this. '1', 'SIMPLE', 'mount_adapters', ...
3
votes
1answer
661 views

Oracle explain for cascading delete is wrong

My deletes in Oracle 11 are very slow. The tables are linked by foreign keys and every foreign key constraint has a delete cascade set on it. If I hit the explain button on a statement like this ...
2
votes
1answer
1k views

Postgres multiple joins slow query, how to store default child record

Ive got a small database in Postgres, about 10,000 records storing company customers. I have a "slow" performing query (about half a second) which is performed very frequently, and my boss wants me to ...
5
votes
1answer
545 views

Execution plan using B+ tree index, but also sorts

I'm using Oracle sqlplus. And I have the following query: SELECT fooID from foo MINUS SELECT fooID from bar; I have created two unclustered B+ tree indexes. One in the field fooIDof the table foo ...
2
votes
2answers
2k views

Understanding time format of the EXPLAIN command - Postgres

When I run the EXPLAIN ANALYZE command on a given query, I'm having a difficult time interpreting the outputted time value. For example (actual time=8163.890..8163.893). Do the internal decimals ...
5
votes
1answer
1k views

Oracle concatenation of queries and function index usage

I have a problem with something I can't understand about indexes in Oracle 11g. We can create test data with: create table test2(field1 varchar2(100),field2 varchar2(100),field3 number,field4 ...
1
vote
1answer
1k views

What does TBSCAN GENROW mean in Explain Plan?

In a DB2 Explain Plan, what does TBSCAN GENROW (line 5 below) mean? SELECT STATEMENT ( Estimated Costs = 1.811E+03 [timerons] ) 1 RETURN 2 NLJOIN 3 [O] TBSCAN 4 SORT ...
6
votes
2answers
119 views

Is there a good “rule of thumb” for translating EXPLAIN cost to (wall-clock) runtime?

From time to time, consumers of my database processes will ask for an estimate of when a given task will be done. While I feel like I know how to read an EXPLAIN in most database engines, I have ...
1
vote
1answer
462 views

What does HSJOIN mean in an Explain Plan?

I have the following EXPLAIN PLAN results from a query on my DB2 database. 0 SELECT STATEMENT ( Estimated Costs = 5.928E+02 [timerons] ) 1 RETURN 2 HSJOIN 3 [O] ...