RE: Are There Slow Queries that Don't Show in the Slow Query Logs?

2013-05-31 Thread Robinson, Eric
> -Original Message- > From: Vikas Shukla [mailto:myfriendvi...@gmail.com] > Sent: Thursday, May 30, 2013 7:19 PM > To: Robinson, Eric; mysql@lists.mysql.com > Subject: RE: Are There Slow Queries that Don't Show in the > Slow Query Logs? > > Hi, > >

RE: Are There Slow Queries that Don't Show in the Slow Query Logs?

2013-05-30 Thread Vikas Shukla
Hi, No, it does not represents the time from request to response not does it includes the time that is spent in waiting for the locks to be released. The slow query log consists of SQL statements that took more than long_query_time seconds to EXECUTE. The default value of long_query_time is 10

Re: Understanding Slow Query Log

2012-09-05 Thread Andy Wallace
y Wallace [mailto:awall...@ihouseweb.com] Sent: Wednesday, September 05, 2012 2:05 PM To: mysql@lists.mysql.com Subject: Re: Understanding Slow Query Log Ok, this raises a question for me - what's a better way to do pagination? On 9/5/12 2:02 PM, Rick James wrote: * LIMIT 0, 50 -- are you doing &

RE: Understanding Slow Query Log

2012-09-05 Thread Rick James
re than 10,000 pages. 10,000 * 10,000 = 100 million ! > -Original Message- > From: Andy Wallace [mailto:awall...@ihouseweb.com] > Sent: Wednesday, September 05, 2012 2:05 PM > To: mysql@lists.mysql.com > Subject: Re: Understanding Slow Query Log > > Ok, this raises a q

Re: Understanding Slow Query Log

2012-09-05 Thread Andy Wallace
Ok, this raises a question for me - what's a better way to do pagination? On 9/5/12 2:02 PM, Rick James wrote: * LIMIT 0, 50 -- are you doing "pagination" via OFFSET? Bad idea. -- Andy Wallace iHOUSEweb, Inc. awall...@ihouseweb.com (866) 645-7700 ext 219 -- "Sometimes it pays to stay in bed

RE: Understanding Slow Query Log

2012-09-05 Thread Rick James
---Original Message- > From: Adarsh Sharma [mailto:eddy.ada...@gmail.com] > Sent: Wednesday, September 05, 2012 11:27 AM > To: Michael Dykman > Cc: mysql@lists.mysql.com > Subject: Re: Understanding Slow Query Log > > true Michael, pasting the output : > > CREATE TABLE `WF_1` (

Re: Understanding Slow Query Log

2012-09-05 Thread Adarsh Sharma
true Michael, pasting the output : CREATE TABLE `WF_1` ( `id` varchar(255) NOT NULL, `app_name` varchar(255) DEFAULT NULL, `app_path` varchar(255) DEFAULT NULL, `conf` text, `group_name` varchar(255) DEFAULT NULL, `parent_id` varchar(255) DEFAULT NULL, `run` int(11) DEFAULT NULL, `

Re: Understanding Slow Query Log

2012-09-05 Thread Adarsh Sharma
I already attached the list. Attaching one more time & thanks for the interest. Cheers On Wed, Sep 5, 2012 at 11:44 AM, Manuel Arostegui wrote: > > > 2012/9/5 Adarsh Sharma > >> Actually that query is not my concern : >> >> i have a query that is taking so much time : >> Slow Log Output : >>

Re: Understanding Slow Query Log

2012-09-04 Thread Manuel Arostegui
2012/9/5 Adarsh Sharma > Actually that query is not my concern : > > i have a query that is taking so much time : > Slow Log Output : > # Overall: 195 total, 16 unique, 0.00 QPS, 0.31x concurrency _ > # Time range: 2012-09-01 14:30:01 to 2012-09-04 14:13:46 > # Attribute tota

Re: Understanding Slow Query Log

2012-09-04 Thread Adarsh Sharma
f so, the query > will get slower. Meanwhile, the index I suggested will (probably) be much > faster. > > > > -Original Message- > > From: Suresh Kuna [mailto:sureshkumar...@gmail.com] > > Sent: Saturday, September 01, 2012 1:03 AM > > To: Adarsh Sharma > > Cc:

RE: Understanding Slow Query Log

2012-09-04 Thread Rick James
ll get slower. Meanwhile, the index I suggested will (probably) be much faster. > -Original Message- > From: Suresh Kuna [mailto:sureshkumar...@gmail.com] > Sent: Saturday, September 01, 2012 1:03 AM > To: Adarsh Sharma > Cc: mysql@lists.mysql.com > Subject: Re: Understa

Re: Understanding Slow Query Log

2012-09-01 Thread Suresh Kuna
Disable log-queries-not-using-indexes to log only queries > 100 sec. Just do "> /var/lib/mysql/slow-queries.log" it will clear the log. On Sat, Sep 1, 2012 at 12:34 PM, Adarsh Sharma wrote: > Hi all, > > I am using Mysql Ver 14.14 Distrib 5.1.58 in which i enabled sl

Re: Understanding Slow Query Log

2012-09-01 Thread yoku ts
> > I am using Mysql Ver 14.14 Distrib 5.1.58 in which i enabled slow query log > by setting below parameters in my.cnf : > > log-slow-queries=/usr/local/mysql/slow-query.log > long_query_time=100 > log-queries-not-using-indexes > > I am assuming from the inf. from the

Understanding Slow Query Log

2012-09-01 Thread Adarsh Sharma
Hi all, I am using Mysql Ver 14.14 Distrib 5.1.58 in which i enabled slow query log by setting below parameters in my.cnf : log-slow-queries=/usr/local/mysql/slow-query.log long_query_time=100 log-queries-not-using-indexes I am assuming from the inf. from the internet that long_query_time is in

Re: alternative to slow query

2012-07-17 Thread brian
On 12-07-16 06:57 PM, Rick James wrote: Plan A: Would the anti-UNION problem be solved by hiding the UNION in a subquery? The outer query would simply return what the UNION found. Of course! Yes, problem solved. Plan B: Insert every row twice into expression_expression -- (e1,e2) and also

RE: alternative to slow query

2012-07-16 Thread Rick James
PM > To: mysql@lists.mysql.com > Subject: Re: alternative to slow query > > On 12-07-03 02:18 PM, Stillman, Benjamin wrote: > > Not sure why it wouldn't show primary as a possible key then... > > Yes, that seems rather strange. > > > > From your

Re: alternative to slow query

2012-07-03 Thread brian
On 12-07-03 02:18 PM, Stillman, Benjamin wrote: Not sure why it wouldn't show primary as a possible key then... Yes, that seems rather strange. From your first email: *** 1. row *** id: 1 select_type: SIMPLE table:

RE: alternative to slow query

2012-07-03 Thread Stillman, Benjamin
age- From: brian [mailto:mysql-l...@logi.ca] Sent: Tuesday, July 03, 2012 1:47 PM To: mysql@lists.mysql.com Subject: Re: alternative to slow query On 12-07-03 01:13 PM, Stillman, Benjamin wrote: > I don't see an index for expression.id. > mysql db_lexi > s

Re: alternative to slow query

2012-07-03 Thread brian
On 12-07-03 01:13 PM, Stillman, Benjamin wrote: I don't see an index for expression.id. mysql db_lexi > show index from expression\G *** 1. row *** Table: expression Non_unique: 0 Key_name: PRIMARY Seq_in_index: 1 Column_name: id

RE: alternative to slow query

2012-07-03 Thread Stillman, Benjamin
I don't see an index for expression.id. -Original Message- From: brian [mailto:mysql-l...@logi.ca] Sent: Tuesday, July 03, 2012 12:28 PM To: mysql@lists.mysql.com Subject: Re: alternative to slow query On 12-07-02 09:33 PM, yoku ts wrote: > Hello, > > add index to expr

Re: alternative to slow query

2012-07-03 Thread brian
On 12-07-02 09:33 PM, yoku ts wrote: Hello, add index to expression1_id and expression2_id on expression_expression. it doesn't use index,following, WHERE ee2.expression1_id = $ID OR ee1.expression2_id = $ID Thank you for your reply. The table already has indexes on thes

Re: alternative to slow query

2012-07-02 Thread yoku ts
Hello, add index to expression1_id and expression2_id on expression_expression. it doesn't use index,following, > WHERE > ee2.expression1_id = $ID > OR > ee1.expression2_id = $ID regards, 2012/7/3 brian > I have a table that joins on itself through a second table: > > table

alternative to slow query

2012-07-02 Thread brian
I have a table that joins on itself through a second table: table expression: id INT PRIMARY KEY, lang_id INT term VARCHAR(128) table expression_expression: id INT PRIMARY KEY expression1_id INT expression2_id INT In order to find associated records, I had originally used a UNION, which work

Re: Slow query - please help

2011-10-05 Thread Tompkins Neil
iPad > > On Oct 5, 2011, at 4:01 AM, Tompkins Neil > wrote: > > > Following my mail below, if anyone can help optimise the query further > that > > would be a great help. > > > > -- Forwarded message -- > > From: Tompkins Neil > >

Re: Slow query - please help

2011-10-05 Thread Johnny Withers
t help. > > -- Forwarded message -- > From: Tompkins Neil > Date: Wed, Oct 5, 2011 at 9:48 AM > Subject: Re: Slow query - please help > To: Johnny Withers > Cc: "mysql@lists.mysql.com" > > > I just revised my query and now get the followin

Fwd: Slow query - please help

2011-10-05 Thread Tompkins Neil
Following my mail below, if anyone can help optimise the query further that would be a great help. -- Forwarded message -- From: Tompkins Neil Date: Wed, Oct 5, 2011 at 9:48 AM Subject: Re: Slow query - please help To: Johnny Withers Cc: "mysql@lists.mysql.com" I ju

Re: Slow query - please help

2011-10-05 Thread Tompkins Neil
g where' After doing this the query speed is acceptable. Thanks Neil On Wed, Oct 5, 2011 at 3:12 AM, Johnny Withers wrote: > Can you post the explain extended output of your query? > > Sent from my iPad > > On Oct 4, 2011, at 2:45 PM, Neil Tompkins > wrote: > >

Re: Slow query - please help

2011-10-05 Thread Tompkins Neil
onst', '267', '100.00', 'Using index condition; Using where' Thanks Neil On Wed, Oct 5, 2011 at 3:12 AM, Johnny Withers wrote: > Can you post the explain extended output of your query? > > Sent from my iPad > > On Oct 4, 2011, at 2:45 PM

Re: Slow query - please help

2011-10-04 Thread Johnny Withers
; To: mark carson >> Cc: "[MySQL]" >> Subject: Re: Slow query - please help >> > >> I downloaded version mysql-5.6.2-m5-win32.msi and he table definitions are >> below, let me know if you need any more information. >> >> CREATE TABLE `districts` (

Fwd: Slow query - please help

2011-10-04 Thread Neil Tompkins
Can anyone help me ? Begin forwarded message: > From: Tompkins Neil > Date: 30 September 2011 20:23:47 GMT+01:00 > To: mark carson > Cc: "[MySQL]" > Subject: Re: Slow query - please help > > I downloaded version mysql-5.6.2-m5-win32.msi and he table definitio

Re: Slow query - please help

2011-09-30 Thread Tompkins Neil
I downloaded version mysql-5.6.2-m5-win32.msi and he table definitions are below, let me know if you need any more information. CREATE TABLE `districts` ( `district_id` int(11) NOT NULL, `language_code` char(2) COLLATE utf8_unicode_ci NOT NULL DEFAULT 'en', `city_id` int(11) DEFAULT NULL,

Slow query - please help

2011-09-30 Thread Tompkins Neil
Hi I've the following query : SELECT city_id, name, meta_title, meta_description, meta_keywords, country_code, link_text, folder_url, enabled, last_changed, nr_hotels, (SELECT COUNT(hotels.hotel_id) FROM hotels WHERE hotels.city_id = cities.city_id AND hotels.country_code = 'gb' AND hotels.enable

Re: Help with slow query

2011-03-10 Thread Andy Wallace
On 3/10/11 10:46 AM, Shawn Green (MySQL) wrote: On 3/10/2011 12:32, Jim McNeely wrote: Rhino, Thanks for the help and time! Actually, I thought the same thing, but what's weird is that is the only thing that doesn't slow it down. If I take out all of the join clauses EXCEPT that one the quer

Re: Help with slow query

2011-03-10 Thread Shawn Green (MySQL)
On 3/10/2011 13:12, Jim McNeely wrote: Shawn, This is the first thing that I though as well, but here is a portion from the show create table for patient_: PRIMARY KEY (`zzk`), KEY `IdPatient` (`IdPatient`), KEY `SSN` (`SSN`), KEY `IdLastword` (`IdLastword`), KEY `DOB` (`DateOfBirth`)

Re: Help with slow query

2011-03-10 Thread Jim McNeely
Shawn, This is the first thing that I though as well, but here is a portion from the show create table for patient_: PRIMARY KEY (`zzk`), KEY `IdPatient` (`IdPatient`), KEY `SSN` (`SSN`), KEY `IdLastword` (`IdLastword`), KEY `DOB` (`DateOfBirth`), KEY `NameFirst` (`NameFirst`), KEY `NameL

Re: Help with slow query

2011-03-10 Thread Shawn Green (MySQL)
On 3/10/2011 12:32, Jim McNeely wrote: Rhino, Thanks for the help and time! Actually, I thought the same thing, but what's weird is that is the only thing that doesn't slow it down. If I take out all of the join clauses EXCEPT that one the query runs virtually instantaneously. for some reason

Re: Help with slow query

2011-03-10 Thread mos
If the optimizer chooses the wrong index, you can tell it what index to use. SELECT a.IdAppt, a.IdPatient, p.NameLast, p.NameFirst, p.NameMI from Appt_ a force index(id_patient) LEFT JOIN patient_ p ON a.IdPatient = p.IdPatient WHERE a.ApptDate >= '2009-03-01'; See http://dev.mysql.com/doc/re

Re: Help with slow query

2011-03-10 Thread Jim McNeely
Rhino, Thanks for the help and time! Actually, I thought the same thing, but what's weird is that is the only thing that doesn't slow it down. If I take out all of the join clauses EXCEPT that one the query runs virtually instantaneously. for some reason it will use the index in that case and i

Re: Help with slow query

2011-03-10 Thread Jim McNeely
Shawn, Thanks for the great help! It still is not working. I did an EXPLAIN on this query with your amended split out join statements and got this: ++-+---+---+---++-+--++-+ | id | select_type | table | type | possi

Re: Help with slow query

2011-03-09 Thread Shawn Green (MySQL)
Hi Jim, On 3/9/2011 17:57, Jim McNeely wrote: I am trying to set up an export query which is executing very slowly, and I was hoping I could get some help. Here is the query: SELECT a.IdAppt, a.IdPatient, p.NameLast, p.NameFirst, p.NameMI, a.IdProcedure, a.ProcName, CAST(CONCAT(a.ApptDate, " "

Help with slow query

2011-03-09 Thread Jim McNeely
I am trying to set up an export query which is executing very slowly, and I was hoping I could get some help. Here is the query: SELECT a.IdAppt, a.IdPatient, p.NameLast, p.NameFirst, p.NameMI, a.IdProcedure, a.ProcName, CAST(CONCAT(a.ApptDate, " ", a.ApptTimeOut) AS CHAR) ApptDateTime, a.Appt

Re: Slow query on MySQL4 server doing simple inner join of two InnoDB tables

2011-01-25 Thread Kendall Gifford
On Mon, Jan 24, 2011 at 6:43 PM, Gavin Towey wrote: > If you show the EXPLAIN SELECT .. output, and the table structure, someone > will be able to give a more definite answer. > > Thanks for the reply Gavin. I actually did place this info in my very first message on this thread, along with my bas

RE: Slow query on MySQL4 server doing simple inner join of two InnoDB tables

2011-01-24 Thread Gavin Towey
If you show the EXPLAIN SELECT .. output, and the table structure, someone will be able to give a more definite answer. -Original Message- From: Kendall Gifford [mailto:zettab...@gmail.com] Sent: Monday, January 24, 2011 2:29 PM To: mysql@lists.mysql.com Subject: Re: Slow query on MySQL4

Re: Slow query on MySQL4 server doing simple inner join of two InnoDB tables

2011-01-24 Thread Kendall Gifford
On Mon, Jan 24, 2011 at 2:20 PM, Kendall Gifford wrote: > > > On Mon, Jan 24, 2011 at 3:40 AM, Joerg Bruehe wrote: > >> Hi everybody! >> >> >> Shawn Green (MySQL) wrote: >> > On 1/21/2011 14:21, Kendall Gifford wrote: >> >> Hello everyone, I've got a database on an old Fedora Core 4 server >> >> r

Re: Slow query on MySQL4 server doing simple inner join of two InnoDB tables

2011-01-24 Thread Kendall Gifford
On Mon, Jan 24, 2011 at 3:40 AM, Joerg Bruehe wrote: > Hi everybody! > > > Shawn Green (MySQL) wrote: > > On 1/21/2011 14:21, Kendall Gifford wrote: > >> Hello everyone, I've got a database on an old Fedora Core 4 server > >> running > >> MySQL 4 (mysql-server.x86_64 4.1.12-2.FC4.1). The database

Re: Slow query on MySQL4 server doing simple inner join of two InnoDB tables

2011-01-24 Thread Joerg Bruehe
Hi everybody! Shawn Green (MySQL) wrote: > On 1/21/2011 14:21, Kendall Gifford wrote: >> Hello everyone, I've got a database on an old Fedora Core 4 server >> running >> MySQL 4 (mysql-server.x86_64 4.1.12-2.FC4.1). The database in question >> has >> just two (InnoDB) tables: >> >> messages (appr

Re: Slow query on MySQL4 server doing simple inner join of two InnoDB tables

2011-01-21 Thread Kendall Gifford
On Fri, Jan 21, 2011 at 2:01 PM, Shawn Green (MySQL) < shawn.l.gr...@oracle.com> wrote: > On 1/21/2011 14:21, Kendall Gifford wrote: > >> Hello everyone, I've got a database on an old Fedora Core 4 server running >> MySQL 4 (mysql-server.x86_64 4.1.12-2.FC4.1). The database in question has >> just

Re: Slow query on MySQL4 server doing simple inner join of two InnoDB tables

2011-01-21 Thread Shawn Green (MySQL)
On 1/21/2011 14:21, Kendall Gifford wrote: Hello everyone, I've got a database on an old Fedora Core 4 server running MySQL 4 (mysql-server.x86_64 4.1.12-2.FC4.1). The database in question has just two (InnoDB) tables: messages (approx 2.5 million records) recipients (approx 6.5 million records)

Re: Slow query on MySQL4 server doing simple inner join of two InnoDB tables

2011-01-21 Thread Reindl Harald
you need hughe ram / innodb_buffer_pool for large datasets in a perfect world the buffer_pool is as large as the data how looks your current config? how much RAM has the machine? Am 21.01.2011 20:21, schrieb Kendall Gifford: > Hello everyone, I've got a database on an old Fedora Core 4 server run

Slow query on MySQL4 server doing simple inner join of two InnoDB tables

2011-01-21 Thread Kendall Gifford
Hello everyone, I've got a database on an old Fedora Core 4 server running MySQL 4 (mysql-server.x86_64 4.1.12-2.FC4.1). The database in question has just two (InnoDB) tables: messages (approx 2.5 million records) recipients (approx 6.5 million records) These track information about email message

Re: Log Mysql slow query into table

2010-11-30 Thread Wagner Bianchi
Have a look on it: mysql> show variables like '%slow%'; +-+--+ | Variable_name | Value| +-+--+ | log_slow_queries| OFF | | slow_launch_time

Log Mysql slow query into table

2010-11-30 Thread Cool Cool
Hi, I am trying to log slow queries into both file and table. I had set as > SET GLOBAL log_output =`TABLE,FILE`; But it isnt getting logged into tables. Can I know if I need to create table or am I missing anything ? Thanks. Regards, Ram

RE: Slow query using string operator

2010-08-11 Thread Jerry Schwartz
gton, CT 06032 860.674.8796 / FAX: 860.674.8341 E-mail: je...@gii.co.jp Web site: www.the-infoshop.com >-Original Message- >From: Travis Ard [mailto:travis_...@hotmail.com] >Sent: Tuesday, August 10, 2010 6:53 PM >To: 'Jerry Schwartz'; mysql@lists.mysql.com >Subject: R

RE: Slow query using string operator

2010-08-11 Thread Jerry Schwartz
>-Original Message- >From: Travis Ard [mailto:travis_...@hotmail.com] >Sent: Tuesday, August 10, 2010 6:53 PM >To: 'Jerry Schwartz'; mysql@lists.mysql.com >Subject: RE: Slow query using string operator > >Can you create a second, indexed column in your fee

Re: Slow query using string operator

2010-08-11 Thread Joerg Bruehe
ng rows > from the feed_new table. The original query does a string operation on the values from both sides before checking the result for equality: > -Original Message- > From: Jerry Schwartz [mailto:je...@gii.co.jp] > Sent: Tuesday, August 10, 2010 3:39 PM > To: mysql@li

RE: Slow query using string operator

2010-08-10 Thread Travis Ard
Schwartz [mailto:je...@gii.co.jp] Sent: Tuesday, August 10, 2010 3:39 PM To: mysql@lists.mysql.com Subject: Slow query using string operator I'm running a set of queries that look like this: === SET @PUBID = (SELECT pub_id FROM pub WHERE pub_code = 'DC'); DROP TEM

Slow query using string operator

2010-08-10 Thread Jerry Schwartz
I'm running a set of queries that look like this: === SET @PUBID = (SELECT pub_id FROM pub WHERE pub_code = 'DC'); DROP TEMPORARY TABLE IF EXISTS feed_new; CREATE TEMPORARY TABLE feed_new ( new_title VARCHAR(255), INDEX (new_title) ); INSERT INTO feed_new VALUES ('U

RE: Slow query using string functions

2010-05-27 Thread Jerry Schwartz
.8796 / FAX: 860.674.8341 www.the-infoshop.com >-Original Message- >From: baron.schwa...@gmail.com [mailto:baron.schwa...@gmail.com] On Behalf Of >Baron Schwartz >Sent: Thursday, May 27, 2010 9:09 AM >To: MySql >Subject: Re: Slow query using string functions > >Jerry,

RE: Slow query using string functions

2010-05-27 Thread Jerry Schwartz
>-Original Message- >From: Gavin Towey [mailto:gto...@ffn.com] >Sent: Wednesday, May 26, 2010 7:39 PM >To: je...@gii.co.jp; mysql@lists.mysql.com >Subject: RE: Slow query using string functions > >Jerry, > >Are you sure this is really your explain plan for this

Re: Slow query using string functions

2010-05-27 Thread Baron Schwartz
Jerry, On Wed, May 26, 2010 at 5:13 PM, Jerry Schwartz wrote: > I have a pretty simple query that seems to take a lot longer than it ought to > (over 2 minutes). > I suspect that if you watch Handler_ stats, you'll find that the EXPLAIN estimate is wrong for some reason and it's accessing many m

Re: Slow query using string functions

2010-05-27 Thread Joerg Bruehe
Hi! Jerry Schwartz wrote: > I have a pretty simple query that seems to take a lot longer than it ought to > (over 2 minutes). > > [[...]] > > SELECT > feed_new.new_title AS `New Title FROM Feed`, > prod.prod_pub_prod_id AS `Lib Code FROM DB`, > prod.prod_title AS `Title FROM

RE: Slow query using string functions

2010-05-26 Thread Gavin Towey
Jerry, Are you sure this is really your explain plan for this query? That's not at all what I would expect to see. Regards, Gavin Towey -Original Message- From: Jerry Schwartz [mailto:je...@gii.co.jp] Sent: Wednesday, May 26, 2010 2:14 PM To: mysql@lists.mysql.com Subject: Slow

Slow query using string functions

2010-05-26 Thread Jerry Schwartz
I have a pretty simple query that seems to take a lot longer than it ought to (over 2 minutes). Table `feed_new` has a single VARCHAR(255) column, `new_title`, that is an index. Table `prod` has many fields: `prod_title` and `pub_id` are both indexes (VARCHAR). `feed_new` has 895 records, `pr

Re: slow query on replication master and slave

2010-04-27 Thread Johan De Meersman
On Wed, Apr 28, 2010 at 12:17 AM, Kandy Wong wrote: > Is it true that the performance of running a query on a live replication > master and slave has to be much slower than running a query on a static > server? > > I've tried to run the following query on a replication master and it takes > 1 min

slow query on replication master and slave

2010-04-27 Thread Kandy Wong
Hi, Is it true that the performance of running a query on a live replication master and slave has to be much slower than running a query on a static server? I've tried to run the following query on a replication master and it takes 1 min 13.76 sec to finish. SELECT *, ABS(timeA-1266143632) a

Re: Slow query, unknown why

2010-04-26 Thread mos
Yves, What happens if you replace the "tk.UserId IN (22943, 10899)" with just one argument " tk.UserId = 22943". Does it run much faster? If so, the In() statement may not be using an index. You could try using a Union instead of In() to see if that is any faster. I have also found tha

Re: Slow query, unknown why

2010-04-25 Thread Rob Wultsch
On Sun, Apr 25, 2010 at 9:12 AM, Yves Goergen wrote: > Hi, > > I'm still stuck with my SQL query that is slow but really shouldn't be. > > The problem is that I cannot create a simple test case. I could only > provide you a whole lot of pages of PHP code and SQL queries to explain > the problem. >

Slow query, unknown why

2010-04-25 Thread Yves Goergen
Hi, I'm still stuck with my SQL query that is slow but really shouldn't be. The problem is that I cannot create a simple test case. I could only provide you a whole lot of pages of PHP code and SQL queries to explain the problem. I have now three versions of my query. One with a sub select, whic

Re: Enabling Slow query log in Mysql 5.0

2010-02-16 Thread Shawn Green
Machiel Richards wrote: Hi All I hope that someone can assist me with this. We have a client with a production MySQL database running MySQL 5.0. Their slow query counts have skyrocketed over the last week and I found

Re: Enabling Slow query log in Mysql 5.0

2010-02-16 Thread Krishna Chandra Prajapati
We have a client with a production MySQL database running > MySQL 5.0. > > > >Their slow query counts have skyrocketed over the last week > and I found that their slow query logs are not enabled. > > > >However wh

Enabling Slow query log in Mysql 5.0

2010-02-15 Thread Machiel Richards
Hi All I hope that someone can assist me with this. We have a client with a production MySQL database running MySQL 5.0. Their slow query counts have skyrocketed over the last week and I found that their slow query logs are

RE: MYSQL slow query log in table.

2009-10-09 Thread John Daisley
Use an etl tool like Talend to load the slow query log into a table. We do something similar with the general query log very successfully with mysql 5 Even with 5.1 i would use this approach over the built in log tables as the built in log tables impact performance quite significantly

RE: MYSQL slow query log in table.

2009-10-08 Thread Brown, Charles
Hello. Thanks for quick response. I'm running Mysql 5.0. We have no plans to upgrade to 5.1 that supports slow-log table. Do you know of any work around to get my slow query into a table -- just wondering. Desperate for a resolution or circumvention. -Original Message- From:

Re: MYSQL slow query log in table.

2009-10-08 Thread Jaime Crespo Rincón
2009/10/7 Brown, Charles : > Hello All. I would like to implement  MYSQL slow query log in table. Can > someone kindly assist me with the table definition and implementation. SHOW CREATE TABLE mysql.slow_log; <http://dev.mysql.com/doc/refman/5.1/en/log-tables.html> -- Jaime

MYSQL slow query log in table.

2009-10-07 Thread Brown, Charles
Hello All. I would like to implement MYSQL slow query log in table. Can someone kindly assist me with the table definition and implementation. Thanks so much in advance This message is intended only for the use of the Addressee and may contain

Re: Questions on un-index searches and slow-query-log

2009-10-05 Thread Walter Heck - OlinData.com
And an answer to 2): http://www.maatkit.org/doc/mk-query-digest.html On Tue, Oct 6, 2009 at 02:59, Brown, Charles wrote: > Questions Folks: > (1) What do you about un-index searches. How can one report and monitor them? > (2) What do you do with the slow-query log. Are there any uti

RE: Questions on un-index searches and slow-query-log

2009-10-05 Thread Gavin Towey
See log-queries-not-using-indexes option in my.cnf, used with the slow log. http://dev.mysql.com/doc/refman/5.1/en/slow-query-log.html Regards, Gavin Towey -Original Message- From: Brown, Charles [mailto:cbr...@bmi.com] Sent: Monday, October 05, 2009 12:59 PM To: Mysql List Cc: John

Questions on un-index searches and slow-query-log

2009-10-05 Thread Brown, Charles
Questions Folks: (1) What do you about un-index searches. How can one report and monitor them? (2) What do you do with the slow-query log. Are there any utilities or scripts out there to filter and manage this log? Thanks This message is

Re: How to optimize a slow query?

2009-09-07 Thread Jia Chen
d | 0.04 | | query end| 0.03 | | freeing items| 0.10 | | closing tables | 0.25 | | logging slow query | 0.01 | | logging slow query | 0.013429 | | cleaning up | 0.04 | +--++ 23 ro

Re: How to optimize a slow query?

2009-09-06 Thread mos
| optimizing | 0.07 | | statistics | 0.33 | | preparing| 0.20 | | executing| 0.04 | | Sending data | 290.153530 | | end | 0.08 | | end | 0.04 | | query end| 0.03

Re: How to optimize a slow query?

2009-09-06 Thread Jia Chen
0033 | | preparing| 0.20 | | executing| 0.04 | | Sending data | 290.153530 | | end | 0.08 | | end | 0.04 | | query end| 0.03 | | freeing items| 0.10 | | closing tables

Re: How to optimize a slow query?

2009-09-06 Thread mos
07 | | statistics | 0.33 | | preparing| 0.20 | | executing| 0.04 | | Sending data | 290.153530 | | end | 0.08 | | end | 0.04 | | query end| 0.000003 | | freeing items|

Re: How to optimize a slow query?

2009-09-06 Thread Jia Chen
| 0.08 | | end | 0.04 | | query end| 0.03 | | freeing items| 0.10 | | closing tables | 0.25 | | logging slow query | 0.01 | | logging slow query | 0.013429 | | cleaning up | 0.04 | +

Re: How to optimize a slow query?

2009-09-05 Thread mos
man/5.0/en/create-index.html for more info. Mike At 10:05 AM 9/5/2009, Jia Chen wrote: Hi there, One simple query took more than 10 minutes. Here is how relevant rows in the slow query log looks like: # Time: 090905 10:49:57 # u...@host: root[root] @ localhost [] # Query_time: 649 Lo

How to optimize a slow query?

2009-09-05 Thread Jia Chen
Hi there, One simple query took more than 10 minutes. Here is how relevant rows in the slow query log looks like: # Time: 090905 10:49:57 # u...@host: root[root] @ localhost [] # Query_time: 649 Lock_time: 0 Rows_sent: 0 Rows_examined: 26758561 use world; create table rmpdata1 select ri

Re: Very Slow Query

2009-08-28 Thread Jia Chen
Hi Dan and John, Thanks for your time! You guys are right. I did not index any columns when I created these tables. After I indexed assignee columns in both tables, the select clause runs in seconds. Best, Jia Dan Nelson wrote: In the last episode (Aug 28), Jia Chen said: Thanks for re

RE: Very Slow Query

2009-08-28 Thread John
+44 (0)7812 451238 Email j...@butterflysystems.co.uk -Original Message- From: Jia Chen [mailto:chen.1...@gmail.com] Sent: 28 August 2009 17:17 To: Dan Nelson; mysql@lists.mysql.com Subject: Re: Very Slow Query Thanks for reply! Yes, it is very slow too if I just execute the &qu

Re: Very Slow Query

2009-08-28 Thread Dan Nelson
In the last episode (Aug 28), Jia Chen said: > Thanks for reply! > > Yes, it is very slow too if I just execute the "select ..." part. > > When I run > mysql> explain extended select a.*, b.assname, b.cname, b.cusip, b.own, > b.pname, b.sname from nber1999.pat1 as a inner join nber1999.compusta

Re: Very Slow Query

2009-08-28 Thread Jia Chen
h_ci | NULL || | +---++-++--++-+--+--+---++-+-++---+--++-+ 5 rows in set (0.00 sec) And the relevant rows in my slow query log file is: # Time: 090828 10:36:17 # u...@host: root[root] @ localhost [] # Query_time: 478 Lock_time: 0 Rows_sent: 0 Rows_examined: 1251 use nber19

Re: Very Slow Query

2009-08-28 Thread Dan Nelson
23:55:56 | NULL | latin1_swedish_ci | > NULL || | > +---++-++--++-+--+--+---++-+-++---+--++-+ > 5 rows in set (0.00 sec) > > And the relevant rows in my slow query log file is: > > # Time: 090828 10:36:17 > # u...@host: root[root] @ localhost [] > # Query_time: 478 Loc

Very Slow Query

2009-08-28 Thread Jia Chen
ant rows in my slow query log file is: /usr/sbin/mysqld, Version: 5.0.75-0ubuntu10.2-log ((Ubuntu)). started with: Tcp port: 3306 Unix socket: /var/run/mysqld/mysqld.sock Time Id CommandArgument # Time: 090828 10:36:17 # u...@host: root[root] @ localhost [] # Query_time:

Re: Slow query Performance

2009-07-16 Thread Dan Nelson
In the last episode (Jul 15), Tachu(R) said: > I'm having random query slowness that i can only reproduce once. My main > question is that the query runs faster the second time around but i dont > have query cache enabled here is some info from mysql profiler; > > The time is spent mostly on the s

RE: Slow query Performance

2009-07-16 Thread Martin Gainty
att.net > To: dstepli...@gmail.com > CC: mysql@lists.mysql.com > Subject: Re: Slow query Performance > > On Wed, 15 Jul 2009 23:53:05 -0400 Darryle Steplight said: > > > Can you show us the output of DESCRIBE score and SHOW INDEX FROM score? > > > > On Wed, Jul 15, 200

Re: Slow query Performance

2009-07-16 Thread Don Read
On Wed, 15 Jul 2009 23:53:05 -0400 Darryle Steplight said: > Can you show us the output of DESCRIBE score and SHOW INDEX FROM score? > > On Wed, Jul 15, 2009 at 6:44 PM, Tachu® wrote: > > I'm having random query slowness that i can only reproduce once. My main > > question is that the query runs

Re: Slow query Performance

2009-07-15 Thread Darryle Steplight
4799 | > | freeing items      | 0.63 | 0.00 |   0.000999 |                 0 > |                   0 |            0 |             0 |             0 > |                 0 |                 0 |                 0 |     0 | > mysql_parse           | sql_parse.cc  |        5805 | &

Slow query Performance

2009-07-15 Thread Tachu®
0 | 0 | 0 | 0 | 0 | 0 | mysql_parse | sql_parse.cc |5805 | | logging slow query | 0.18 | 0.00 | 0.00 | 0 | 0 |0 | 0 | 0 |

updates in slow query log

2009-02-15 Thread AM Corona
Is there anyway to keep updates and deletes from showing up in the slow query logs?

Re: slow query log

2009-01-02 Thread Ananda Kumar
# Query_time: 0 Lock_time: 0 Rows_sent: 1 Rows_examined: 150 SELECT SUM(COUNTER_VALUE) FROM STO_LIS sl, SCAT_LIS sfl WHERE l.STO_LIS_ID =sfl.LIS_ID AND sfl.CAT_ID = '-1'; This is what is there in the slow-query log On 1/2/09, Baron Schwartz wrote: > > It executes in 0 sec

Re: slow query log

2009-01-02 Thread Baron Schwartz
It executes in 0 sec when you run it. It might be in the query cache. Try it with SQL_NO_CACHE. But even then it might run faster than it did when it got logged in the slow log, because the table's data might be in memory and therefore faster to access. The point is that the slow quer

Re: slow query log

2009-01-01 Thread Ananda Kumar
--+ | NULL | ++ 1 row in set (0.00 sec) On 12/31/08, Baron Schwartz wrote: > > Hi, > > On Wed, Dec 31, 2008 at 8:44 AM, Ananda Kumar wrote: > > Hi All, > > I have enabled slow query log. > > Generally this file will have s

  1   2   3   4   >