The tag has no wiki summary.

learn more… | top users | synonyms

-1
votes
1answer
22 views

How can I optimize a big query when EXPLAIN hints don't work?

We have an application that uses MySQL Ver 14.14 Distrib 5.5.35, for debian-linux-gnu (x86_64) using readline 6.2, which esentially manages lots of data from lots of people over lots of tables and ...
2
votes
1answer
59 views

Postgresql not using GIN trigram index when performing non-ASCII LIKE query?

Steps to reproduce Create database CREATE DATABASE citiesdb WITH OWNER = citiesowner ENCODING = 'UTF8' TABLESPACE = pg_default LC_COLLATE = 'C' LC_CTYPE = 'C' ...
0
votes
0answers
39 views

explain plan ,joins and optimization

I have to join 6 tables in sql query and each of these tables have 1 join to each of there master tables . Hence i have defined 5 subqueries within a sql query but i am seeing a lot of performance ...
0
votes
1answer
45 views

Oracle 10g: same query, different plans on copies of the same DB

I have a query joining a number of long tables (primary key in one table, indexed column in another) which results in different plans on different copies of the same database. The structure of copies ...
1
vote
1answer
89 views

Understanding MySQL's 'explain'

I have following query with explain: mysql> explain select dd.data from dane dd join test1.tag1 t1 on dd.id = t1.id join test1.tag2 t2 on dd.id = t2.id join ...
1
vote
1answer
63 views

Postgres, levenshtein distance and nested queries

I have a DB Table with 3,000,000 rows or more like that: |ID|T4|T16|T64|TL where ID =INTEGER (PK) and T4,T16,T64,TL are text fields. Each one is larger in length than the previous, i.e., LENGTH(T4) ...
0
votes
1answer
53 views

Postgres EXPLAIN ANALYZE behavior

I want to benchmark performance of a particular complicated query JOIN for various values of primary key ID. Most previous approaches say to use EXPLAIN ANALYZE for the query in question and get the ...
0
votes
1answer
64 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
1answer
95 views

On which fields to index? Fields queried (WHERE) or fields returned (SELECT)

I have a large MySQL database table (~1 million rows and growing) on an AWS RDS Medium instance: mysql> describe clients; ...
1
vote
1answer
89 views

Identical query, tables, but different EXPLAIN and performance

I have two tables levels and users_favorites +--------------------+--------------+------+-----+---------+-------+ | Field | Type | Null | Key | Default | Extra | ...
0
votes
1answer
66 views

Index being ignored by Oracle

I have a table for sensor data, simplified it looks like this: DEVICE_ID NUMBER SENSOR_ID NUMBER DATA_TIME NUMBER DATA_VALUE1 NUMBER The table constains billions of rows and is partitioned by week ...
0
votes
0answers
27 views

Large-query optimization: given my “explain” results, what stands out?

I've got a monster query, which runs quite quick in many cases, but in some cases very much slower. The EXPLAIN output below is from one of the slow cases. I'm guessing that the slowdown is related ...
0
votes
1answer
31 views

I have to create INDEX but which? [closed]

I have to create INDEX but which with this query ? SELECT * FROM TABLE WHERE A = 1 AND B = '5427dbfac0a8280d74bc672c72636a4f' AND C = 'BIL' AND D = 'B' and E = '01' GROUP BY F,G,E,H,I ORDER ...
1
vote
1answer
56 views

Does limit impact affected rows or not?

I have this table: CREATE TABLE IF NOT EXISTS `usergroups` ( `id` int(11) unsigned NOT NULL AUTO_INCREMENT, `user_id` int(11) unsigned NOT NULL, `group_id` smallint(5) unsigned NOT ...
4
votes
3answers
2k views

Why does MySQL ignore the index even on force for this order by?

I run an EXPLAIN: mysql> explain select last_name from employees order by last_name; +----+-------------+-----------+------+---------------+------+---------+------+-------+----------------+ | ...
2
votes
1answer
71 views

Why isn't the rows of an EXPLAIN accurate?

I have the following table: mysql> select count(*) from employees; +----------+ | count(*) | +----------+ | 10000 | +----------+ 1 row in set (0.03 sec) I do an EXPLAIN: ...
1
vote
1answer
188 views

Fast query, in theory using index, still in the slow-query log

I'm having a hard time interpreting the EXPLAIN results of these queries. They both end up in the slow-query log, but the execution time is ~0.0050ms and the final result set is always under 100 rows. ...
0
votes
1answer
153 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?
1
vote
1answer
74 views

Query optimization when no row is returned

I am using explain to figure out what is happening in my query which is: explain select t from c where u1_id = 1 group by t; I see "Using where" in the Extra column of the resultset. But this only ...
4
votes
3answers
3k views

Optimizing queries on a range of timestamps (two columns)

I use postgresql-9.1 with ubuntu 12.04. I need to select records inside a range of time: my table time_limits has two timestamp fields and one property integer. Indeed there are other info columns ...
1
vote
0answers
74 views

Mysql: Large Query with subqueries optimization

Any query optimization gurus in the house?? Anyway, I am trying to attack this on two fronts, one being to code a way around it but secondly, I'm thinking some real optimization might help in the ...
1
vote
2answers
234 views

Mysql: Large Query with subqueries optimization

Any query optimization gurus in the house?? Anyway, I trying to attach this on two fronts, one I'm trying to code a way around it but secondly, I'm thinking some real optimization might help in the ...
5
votes
2answers
125 views

mysql join by 2 ways - how it works? - which gives performance difference

I had 2 different ways to query the content which showed performance difference when executed. The 1st way is EXPLAIN select SOME_COLUMNS from ( select * from A where CONDITION ) p inner join ( ...
1
vote
1answer
1k views

Why I cannot let EXPLAIN update statements?

I can imagine that it's actually more important to explain SELECT statements, but I wonder why there's no possibility to use EXPLAIN on UPDATEs/INSERTs. I may use a WHERE-statement in an UPDATE where ...
5
votes
2answers
5k views

Why am I getting `Impossible WHERE noticed after reading const tables` in explain query?

I have a unique compound key like fr(fromid,toid) in the table, when I run the query with explain I get the following result: Impossible WHERE noticed after reading const tables` The query I ran: ...