explain Questions

1

I have two simple tables: CREATE TABLE cat_urls ( Id int(11) NOT NULL AUTO_INCREMENT, SIL_Id int(11) NOT NULL, SiteId int(11) NOT NULL, AsCatId int(11) DEFAULT NULL, Href varchar(2048) NOT NU...
Vanvanadate asked 25/12, 2014 at 8:57

4

Solved

How do I use DB2's Explain function? -- both to run it, and to use it to optimize queries. Is there a better tool available for DB2? I've built queries before, but the only way I've had to tell h...
Faveolate asked 8/7, 2009 at 15:26

1

Solved

I've been searching for this and they all state some sort of percentage, explain this: EXPLAIN EXTENDED SELECT * FROM PageAccess ORDER BY AccessId DESC LIMIT 20; SELECT COUNT(*) FROM PageAccess; ...
Castello asked 9/4, 2014 at 17:22

3

Solved

I am trying to understand the query plan for a select statement within a PL/pgSQL function, but I keep getting errors. My question: how do I get the query plan? Following is a simple case that rep...
Lozoya asked 28/2, 2014 at 16:56

1

Solved

I'm trying to use ST_SnapToGrid and then GROUP BY the grid cells (x, y). Here is what I did first: SELECT COUNT(*) AS n, ST_X(ST_SnapToGrid(geom, 50)) AS x, ST_Y(ST_SnapToGrid(geom, 50)) AS y F...
Crystallo asked 18/2, 2014 at 19:11

1

Solved

The queries are performed on a large table with 11 million rows. I have already performed an ANALYZE on the table prior to the query executions. Query 1: SELECT * FROM accounts t1 LEFT OUTER JOIN...

2

I ran a query in Mysql like below: EXPLAIN SELECT * FROM( SELECT * # Select Number 2 FROM post WHERE parentid = 13 ORDER BY time, id LIMIT 1, 10 ) post13_childs JOIN post post13_childs_child...
Excavation asked 20/12, 2013 at 9:48

2

Consider the below Mongo index strategy and the query, Index: db.collec.ensureIndex({a:1,b:1,c:1}); Query: db.collec.find({"a":"valueA"},{"_id":0,"a":1,"c":1}).sort({"c":-1}).limit(150) The ...
Ragouzis asked 22/10, 2013 at 11:24

2

Solved

I've got a basic MySQL performance question related to explain. I have two queries that return the same result and I am trying to understand how to make sense of the EXPLAIN of the execution plans....
Bhakti asked 11/1, 2013 at 15:49

1

Solved

I have what seems like a fairly simple table structure, however MySQL is defaulting to a less than optimal index_merge on a simple query. Here's the table structure: CREATE TABLE IF NOT EXISTS ...
Favata asked 29/4, 2013 at 16:19

2

I have this query which takes about 3.5 seconds just to fetch 2 records. However there are over 100k rows in testimonials, 13k in users, 850 in courses, 2 in exams. SELECT t.*, u.name, f.feedback ...
Lottery asked 25/3, 2013 at 14:1

2

Solved

I have two queries to get the same data, they more or less have the same execution time. SELECT name AS prog_name,d.chap_name,d.vid_name,d.idvideo FROM program JOIN (SELECT name AS chap_name,cha...
Terrorist asked 21/5, 2012 at 11:13

1

I have a simple table called 'million_words'. It has one row with two columns -> id INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY & word VARCHAR(50 NOT NULL. I run this query -: EXPLAIN SEL...
Halsey asked 19/2, 2013 at 8:57

2

Solved

I want to select the content of the column text from entrytable. EXPLAIN SELECT text FROM entrytable WHERE user = 'username' && `status` = '1' && ( `status_spam_user` = 'no_spam' ...
Enquire asked 3/1, 2013 at 10:59

1

Solved

For example, I have 3 tables: user, group and permission, and two many2many relationships between them: user_groups and group_permissions. I need to select all permissions of given user, without r...
Trapp asked 30/8, 2012 at 16:58

2

Solved

I have been playing around with indexes on MySQL (5.5.24, WinXP), but I can't find the reason of why the server is not using one index when a LIKE is used. The example is this: I have created a t...
Rally asked 19/8, 2012 at 21:8

2

Solved

I have a table structure like comment_id primary key comment_content comment_author comment_author_url When I fire query like explain SELECT * FROM comments ORDER BY comment_id It outputs t...
Asturias asked 12/8, 2012 at 8:51

2

Solved

I have a table of 200k entries with columns of INT's. I want to create an index to make queries faster. This is the query I would like to execute: SELECT A,B,C,D,E FROM table WHERE A=23 and (B=45 o...
Cutout asked 22/3, 2012 at 20:39

2

Solved

I use MySQL server version 5.5.14 and now I am trying this simple SQL query with Explain command: EXPLAIN SELECT id, name, thumb FROM `twitter_profiles` LIMIT 10; and it shows me this result: +...
Katakana asked 21/7, 2011 at 11:47

3

Solved

I have a table from a legacy system which does not have a primary key. It records transactional data for issuing materials in a factory. For simplicities sake, lets say each row contains job_numbe...
Antony asked 31/3, 2011 at 17:22

7

Solved

I'm reading this article and I'm trying to understand this SQL statement but I am still somewhat new to SQL. I'm not sure what comment and c refer to. I think one of them is the table name but I ...
Peduncle asked 13/3, 2011 at 0:29

2

Solved

I used an SQLite database and run an EXPLAIN statement before executing the actual query to verify if there was any attempt to write on the database. Now, we have migrated to SQL Server and I need...
Jarl asked 2/2, 2011 at 9:49

2

Solved

When we prefix an SQL query with the keyword "explain" we get a table with some columns. Please tell me what is the "type" column. What does eq_ref and ref mean in that context.
Mayweed asked 22/12, 2010 at 10:7

© 2022 - 2024 — McMap. All rights reserved.