Re: mysql logs query with indexes used to the slow-log and not logging if there is index in reverse order

2012-10-16 Thread spameden
That's exactly what I thought when reading Michael's email, but tried anyways, thanks for clarification :) 2012/10/16 > 2012/10/16 12:57 -0400, Michael Dykman > your now() statement is getting executed for every row on the select. try > ptting the phrase up front > as in: > set @ut= u

Re: mysql logs query with indexes used to the slow-log and not logging if there is index in reverse order

2012-10-16 Thread hsv
2012/10/16 12:57 -0400, Michael Dykman your now() statement is getting executed for every row on the select. try ptting the phrase up front as in: set @ut= unix_timestamp(now()) and then use that in your statement. Quote: Functions that return the current date or time each are

Re: mysql logs query with indexes used to the slow-log and not logging if there is index in reverse order

2012-10-16 Thread spameden
Interesting thought, but I get the same result. # Query_time: 0.001769 Lock_time: 0.001236 Rows_sent: 0 Rows_examined: 0 use kannel; SET timestamp=1350413592; select * from send_sms FORCE INDEX (priority_time) where time<=@ut order by priority limit 0,11; the MySQL i'm using is 5.5.28 from dotd

Re: mysql logs query with indexes used to the slow-log and not logging if there is index in reverse order

2012-10-16 Thread Michael Dykman
your now() statement is getting executed for every row on the select. try ptting the phrase up front as in: set @ut= unix_timestamp(now()) and then use that in your statement. On 2012-10-16 8:42 AM, "spameden" wrote: Will do. mysql> SHOW GLOBAL VARIABLES LIKE '%log%'; +---

Re: mysql logs query with indexes used to the slow-log and not logging if there is index in reverse order

2012-10-16 Thread spameden
Will do. mysql> SHOW GLOBAL VARIABLES LIKE '%log%'; +-+-+ | Variable_name | Value | +-+-+ | back_log

Re: mysql logs query with indexes used to the slow-log and not logging if there is index in reverse order

2012-10-16 Thread Shawn Green
On 10/15/2012 7:15 PM, spameden wrote: Thanks a lot for all your comments! I did disable Query cache before testing with set query_cache_type=OFF for the current session. I will report this to the MySQL bugs site later. First. What are all of your logging settings? SHOW GLOBAL VARIAB

Re: mysql logs query with indexes used to the slow-log and not logging if there is index in reverse order

2012-10-15 Thread spameden
Thanks a lot for all your comments! I did disable Query cache before testing with set query_cache_type=OFF for the current session. I will report this to the MySQL bugs site later. 2012/10/16 Rick James > **Ø **My initial question was why MySQL logs it in the slow log if the > quer

RE: mysql logs query with indexes used to the slow-log and not logging if there is index in reverse order

2012-10-15 Thread Rick James
Ø My initial question was why MySQL logs it in the slow log if the query uses an INDEX? That _may_ be worth a bug report. A _possible_ answer... EXPLAIN presents what the optimizer is in the mood for at that moment. It does not necessarily reflect what it was in the mood for when it ran

RE: mysql logs query with indexes used to the slow-log and not logging if there is index in reverse order

2012-10-15 Thread Rick James
ber 15, 2012 3:23 PM To: Rick James Cc: mysql@lists.mysql.com Subject: Re: mysql logs query with indexes used to the slow-log and not logging if there is index in reverse order Sorry, my previous e-mail was a test on MySQL-5.5.28 on an empty table. Here is the MySQL-5.1 Percona testing table: mys

Re: mysql logs query with indexes used to the slow-log and not logging if there is index in reverse order

2012-10-15 Thread spameden
f I turn it off - it's all fine My initial question was why MySQL logs it in the slow log if the query uses an INDEX? And why it's not logging if I create an INDEX (time, priority) (but in the query there is FORCE INDEX (priority,time) specified, so MySQL shouldn't use newly creat

Re: mysql logs query with indexes used to the slow-log and not logging if there is index in reverse order

2012-10-15 Thread spameden
not a 3-digit integer, it is a full 32-bit integer (4 bytes). > Perhaps you should have SMALLINT UNSIGNED (2 bytes). > > * BIGINT takes 8 bytes -- usually over-sized. > > > > -Original Message- > > From: spameden [mailto:spame...@gmail.com] > > Sent: Monday, O

RE: mysql logs query with indexes used to the slow-log and not logging if there is index in reverse order

2012-10-15 Thread Rick James
IGINT takes 8 bytes -- usually over-sized. > -Original Message- > From: spameden [mailto:spame...@gmail.com] > Sent: Monday, October 15, 2012 1:42 PM > To: mysql@lists.mysql.com > Subject: mysql logs query with indexes used to the slow-log and not > logging if there is

Re: mysql logs query with indexes used to the slow-log and not logging if there is index in reverse order

2012-10-15 Thread spameden
-+---+---+---+---+-+--+--+-+ > | 1 | SIMPLE | send_sms_test | index | time_priority | priority_time > | 12 | NULL | *22* | Using where | > > ++-+---+---+---+---+-+--+--+-+ > > And if both indexes created I do not have anymore this query in the > slow-log. > > Of course If I disable log_queries_not_using_indexes I get none of the > queries. > > So is it a bug inside Percona's implementation or it's generally MySQL > behavior? > > Thanks >

mysql logs query with indexes used to the slow-log and not logging if there is index in reverse order

2012-10-15 Thread spameden
t | index | time_priority | priority_time | 12 | NULL | *22* | Using where | ++-+---+---+---+---+-+--+--+---------+ And if both indexes created I do not have anymore this query in the slow-log. Of course If I disable log_quer

Re: Enabling slow log queries for particular db

2010-04-12 Thread Aravinth
Hi Ramesh, As of my knowledge we can only enable "slow query log" globally Regards, Aravinth On Mon, Apr 12, 2010 at 4:01 PM, RaMeSh wrote: > Hi All > > How can I get MySQL to only 'log-slow-queries' on specific databases > instead > of globally? > > -- > Ramesh >

Enabling slow log queries for particular db

2010-04-12 Thread RaMeSh
Hi All How can I get MySQL to only 'log-slow-queries' on specific databases instead of globally? -- Ramesh

SLOW LOG

2008-08-27 Thread Krishna Chandra Prajapati
Hi all, I want to enable 'log_slow_queries' and 'log_queries_not_using_indexes'. Enabling of two components will log all slow queris and queries not using index in the log file. How much extra burden will be on the Production server after enabling. In docs, i have read that enabling log-bin makes

Re: Slow log logs non-slow statements

2006-08-15 Thread Jay Pipes
> in my.cnf and restarted my server. After that I see statements logged > into the slow-log-file. > > But it seems that mysql logs too much into that file. > > When executing this statement: > > mysql> show variables like "%tx%"; > +-

Slow log logs non-slow statements

2006-08-15 Thread Dominik Klein
I have specified log-slow-queries long-query-time=10 in my.cnf and restarted my server. After that I see statements logged into the slow-log-file. But it seems that mysql logs too much into that file. When executing this statement: mysql> show variables like &

does Query_time in slow log include time for client to receive answer set?

2006-07-13 Thread Sid Lane
rst of these queries which execute hundreds of thousands of time/day to suddeny slow log (w/such low Rows_% #s) across multiple MySQL nodes then just as suddenly stop?

Re: Slow Log

2002-08-15 Thread Gerald Clark
Did you check your error logs? Does mysql have write permissions to /home/admin ? John Wards wrote: >I am having problems with mysql loggin slow queries. I have set up mysql.sh >like this > >log_dir=/home/admin/slow_slog.log > >$bindir/safe_mysqld --datadir=$datadir --pid-file=$pid_file --log-sl

Slow Log

2002-08-15 Thread John Wards
I am having problems with mysql loggin slow queries. I have set up mysql.sh like this log_dir=/home/admin/slow_slog.log $bindir/safe_mysqld --datadir=$datadir --pid-file=$pid_file --log-slow-queri es=$log_dir & That is all I have changed and re started mysql. but no slow_slog.log file has been