Re: Slow queries / inserts InnoDB

2012-10-09 Thread Cheng Xianming
Tello is right ! Moreno, and I sugest that: if you want query by "SUBSTR(ISN,2)" ,you should create a field named like "isnInfo", and save SUBSTR(ISN,2) to this filed when you insert . don't forget create a index on this field . 于 12-10-9 下午10:04, Andrés Te

RE: Slow queries / inserts InnoDB

2012-10-09 Thread Rick James
STATUS EXPLAIN SELECT (with substitutions filled in) > -Original Message- > From: Andrés Tello [mailto:mr.crip...@gmail.com] > Sent: Tuesday, October 09, 2012 7:04 AM > To: Adrián Espinosa Moreno > Cc: mysql@lists.mysql.com > Subject: Re: Slow queries / inserts InnoDB >

Re: Slow queries / inserts InnoDB

2012-10-09 Thread Andrés Tello
You are forcing mysql to do full table scans with the substr... Use explain to see that you aren't using any index. Avoid the use of substr in the where clause, by splitting your data, index that field and do you query over that field. That is why your query is so slow. the slow insert, is du

Re: Slow queries when using left join

2010-03-19 Thread Johan De Meersman
2010/3/19 Olav Mørkrid > Dear MySQL forum. > > I have performance problems when using "left join x" combined with > "where x.y is null", in particularily when combining three tables this > way. > With a left join, particularly when you're using *is (not) null*, you can't use index selecting on y

Re: slow queries not being logged

2010-02-23 Thread Carsten Pedersen
eally sure what to look for yet (Rather new to MySQL and hope google >> will >> have some answers J ) >> >> >> >> >> >> Thank you >> >> >> >> >> >> >> >> >> >> From: John Daisley [mail

Re: slow queries not being logged

2010-02-23 Thread Ananda Kumar
some of them now but not > really sure what to look for yet (Rather new to MySQL and hope google will > have some answers J ) > > > > > > Thank you > > > > > > > > > > From: John Daisley [mailto:mg_s...@hotmail.com] > Sent: 23 February 2010 10

RE: slow queries not being logged

2010-02-23 Thread Machiel Richards
some answers J ) Thank you From: John Daisley [mailto:mg_s...@hotmail.com] Sent: 23 February 2010 10:24 AM To: machi...@rdc.co.za; mysql@lists.mysql.com Subject: RE: slow queries not being logged > From: machi...@rdc.co.za > To: mysql@lists.mysql.com > Subject: slo

RE: slow queries not being logged

2010-02-23 Thread John Daisley
> From: machi...@rdc.co.za > To: mysql@lists.mysql.com > Subject: slow queries not being logged > Date: Tue, 23 Feb 2010 09:59:13 +0200 > > Good day all > > > > I hope you can assist me with this one... > > > > We have a client where the slow query log wa

Re: Slow Queries

2008-04-24 Thread Sebastian Mendel
D Hill schrieb: On Thu, 24 Apr 2008 at 08:58 +0200, [EMAIL PROTECTED] confabulated: D Hill schrieb: I have something I am trying to resolve with an over abundant number of slow queries. Perhaps it is because of some additional indexes needed. As soon as I enabled the option 'log_queries_no

Re: Slow Queries

2008-04-24 Thread D Hill
On Thu, 24 Apr 2008 at 10:16 -0400, [EMAIL PROTECTED] confabulated: On Thu, Apr 24, 2008 at 2:54 AM, Sebastian Mendel <[EMAIL PROTECTED]> wrote: IMHO not in this case, cause it is just a simple "WHERE field IN ()" I'm pretty sure that just looks like a bunch of ORs to MySQL. If it didn't us

Re: Slow Queries

2008-04-24 Thread Perrin Harkins
On Thu, Apr 24, 2008 at 2:54 AM, Sebastian Mendel <[EMAIL PROTECTED]> wrote: > IMHO not in this case, cause it is just a simple "WHERE field IN ()" I'm pretty sure that just looks like a bunch of ORs to MySQL. If it didn't use the index with OR, it won't use it with IN. What usually works is to

Re: Slow Queries

2008-04-24 Thread D Hill
On Thu, 24 Apr 2008 at 08:58 +0200, [EMAIL PROTECTED] confabulated: D Hill schrieb: I have something I am trying to resolve with an over abundant number of slow queries. Perhaps it is because of some additional indexes needed. As soon as I enabled the option 'log_queries_not_using_indexes =

Re: Slow Queries

2008-04-23 Thread Sebastian Mendel
D Hill schrieb: I have something I am trying to resolve with an over abundant number of slow queries. Perhaps it is because of some additional indexes needed. As soon as I enabled the option 'log_queries_not_using_indexes = 1' in the configuration file, I started getting messages relating to

Re: Slow Queries

2008-04-23 Thread Sebastian Mendel
Perrin Harkins schrieb: On Wed, Apr 23, 2008 at 9:22 PM, D Hill <[EMAIL PROTECTED]> wrote: Can anyone shed some light if I should index wite_desc to speed things up? No, since you don't use that column at all. If you're not on MySQL 5, upgrading to MySQL 5 will help. Otherwise, you're best

Re: Slow Queries

2008-04-23 Thread Perrin Harkins
On Wed, Apr 23, 2008 at 9:22 PM, D Hill <[EMAIL PROTECTED]> wrote: > Can anyone shed some light if I should index wite_desc to speed things up? No, since you don't use that column at all. If you're not on MySQL 5, upgrading to MySQL 5 will help. Otherwise, you're best bet is to rewrite the quer

Re: Slow queries

2006-08-17 Thread Jon Molin
On 8/17/06, Chris <[EMAIL PROTECTED]> wrote: > Unfortunately didn't that help, it leads to: > ++-+---+---+--- > > | id | select_type | table | type | possible_keys > | key | key_len | ref | rows| Extra >

Re: Slow queries

2006-08-17 Thread Chris
Unfortunately didn't that help, it leads to: ++-+---+---+--- | id | select_type | table | type | possible_keys | key | key_len | ref | rows| Extra | ++-+---+---+--- | 1 |

Re: Slow queries

2006-08-17 Thread Jon Molin
On 8/17/06, Chris <[EMAIL PROTECTED]> wrote: Jon Molin wrote: > Hi list > > I have 5 tables: > > words (word_id int auto_increment, word varbinary(40)) (has ~3.5M > rows) with the keys: > PRIMARY KEY (`word_id`),UNIQUE KEY `word_ind` (`word`) > > phrases (phrase_id int auto_increment, phrase var

Re: Slow queries

2006-08-17 Thread Chris
Jon Molin wrote: Hi list I have 5 tables: words (word_id int auto_increment, word varbinary(40)) (has ~3.5M rows) with the keys: PRIMARY KEY (`word_id`),UNIQUE KEY `word_ind` (`word`) phrases (phrase_id int auto_increment, phrase varbinary(100)) (has ~11M rows) with the keys: PRIMARY KEY (`p

Re: Slow Queries Log and Index-less queries

2005-08-30 Thread Alexey Polyakov
> > > I have a question regarding the slow queries log, and queries not using > index. > > I have a small table, with say 10 entries, like that : > ID | Element > - > 1 | One > 2 | Two > 3 | Three > 4 | Four > 5 | Five > 6 | Six > 7 | Seven > 8 | Eight > 9 | Nine > 10 | Ten > > I w

Re: Slow queries, why?

2005-05-05 Thread Gleb Paharenko
Hello. There could be a lot of reasons for such a delay. First, you should switch to bulk inserts and perform all operation as a single transaction. Avoid usage of the autoextended or per-table tablespaces. Are you able to upgrade? There could be some performance improvements in the newer ve

Re: Slow queries, why?

2005-05-04 Thread Joseph Cochran
Thanks! Explain and InnoDB monitor were exactly what I needed to diagnose and fix the problem! In case you were curious, the issue was that the statement I was expecting to run was not the statement that was running, but the first hundred and some-odd characters in both were the same. Using the mon

Re: Slow queries, why?

2005-05-04 Thread David Griffiths
Yes, indexes slow down inserts (or updates that change the value of a column that is indexed). Also, remember that MySQL only uses one index per per table in a query. So if there are some columns in your table that are indexed, but, 1) Have poor cardinality (number of distinct values - low card

RE: Slow queries, why?

2005-05-04 Thread lakshmi.narasimharao
me in this, it is very urgent. Thanks, Narasimha -Original Message- From: Gleb Paharenko [mailto:[EMAIL PROTECTED] Sent: Wednesday, May 04, 2005 1:11 PM To: mysql@lists.mysql.com Subject: Re: Slow queries, why? Hello. > We're running MySQL 4.11 on a machine with 2GB memory, the

Re: Slow queries, why?

2005-05-04 Thread Gleb Paharenko
Hello. > We're running MySQL 4.11 on a machine with 2GB memory, the table is > InnoDB with a compound primary key, and additional indexes on all rows > with searchable options in the API. Any generic advice or admin tools > would be great. Use EXPLAIN to determine how efficient your in

Re: Slow queries, why?

2005-05-03 Thread Scott Haneda
on 5/3/05 7:25 PM, Joseph Cochran at [EMAIL PROTECTED] wrote: > So here's my situation: we have a database that has a table of about 5 > million rows. To put a new row into the table, I do an INSERT ... > SELECT, pulling data from one row in the table to seed the data for > the new row. When there

RE: Slow queries only the first time

2005-03-10 Thread Gordon
disadvantages of losing the data on system shutdown. -Original Message- From: Michael Stassen [mailto:[EMAIL PROTECTED] Sent: Thursday, March 10, 2005 1:43 PM To: Bob O'Neill Cc: mysql@lists.mysql.com Subject: Re: Slow queries only the first time On Mar 10, 2005, at 11:20 AM, Bob O&

Re: Slow queries only the first time

2005-03-10 Thread Michael Stassen
On Mar 10, 2005, at 11:20 AM, Bob O'Neill wrote: Hello. I am wondering why some of my queries are slow on the first run, but speedy on subsequent runs. They are not being query cached, as I have query_cache_type set to DEMAND. Is it something as simple as pulling the data into RAM from disk,

Re: Slow queries only the first time

2005-03-10 Thread Homam S.A.
Most likely it's the OS cache caching all those disk segments in memory. Also in InnoDB, MySQL uses the Buffer Pool Size to cache data pages in addition to the OS cache. If you're running ona Windows machine, you can easily tell what's going on by opening up Performance Monitor and watching Pages/

RE: Slow queries, need advice on how to improve; key_buffer?

2005-01-11 Thread Pete Moran
I recently had a similar problem, however you may find that its more of a case of correctly indexing your tables. Yyou should look for the tables which need indexing, I enabled the slow-query-log as well as enabling of logging of queries which didn’t use indexes and found some which did some very

RE: Slow queries, need advice on how to improve; key_buffer - zen -cart?

2005-01-07 Thread Tom Crimmins
[snip] # Time: 050107 17:40:41 # [EMAIL PROTECTED]: zencarttest[zencarttest] @ [xxx.xxx.xxx.xxx] # Query_time: 13 Lock_time: 0 Rows_sent: 148 Rows_examined: 1567270 use zencarttest; select distinct m.manufacturers_id, m.manufacturers_name from zen_manufacturers m left join

RE: Slow queries, need advice on how to improve; key_buffer - zen -cart?

2005-01-07 Thread Tom Crimmins
--Original Message- From: BD Sent: Friday, January 07, 2005 11:58 AM To: Tom Crimmins Cc: mysql@lists.mysql.com Subject: RE: Slow queries, need advice on how to improve; key_buffer - zen-cart? OK thanks Tom, The application I am using for the site is www.zen-cart.com so I'm not sure I can do

RE: Slow queries, need advice on how to improve; key_buffer - zen-cart?

2005-01-07 Thread BD
TYPE=MyISAM | | zen_products_to_categories | CREATE TABLE `zen_products_to_categories` ( `products_id` int(11) NOT NULL default '0', `categories_id` int(11) NOT NULL default '0', PRIMARY KEY (`products_id`,`categories_id`) ) TYPE=MyISAM | +- -

RE: Slow queries, need advice on how to improve; key_buffer?

2005-01-07 Thread Tom Crimmins
Friday, January 07, 2005 11:21 AM To: Tom Crimmins Cc: mysql@lists.mysql.com Subject: RE: Slow queries, need advice on how to improve; key_buffer? Hi Tom, OK thanks I just added the set-variable = key_buffer = 64M line to my my.cnf file and at least I got no errors and the MySQL server restarted

RE: Slow queries, need advice on how to improve; key_buffer?

2005-01-07 Thread BD
the mean time? BD -Original Message- From: Tom Crimmins [mailto:[EMAIL PROTECTED] Sent: Friday, January 07, 2005 12:08 PM To: BD Cc: mysql@lists.mysql.com Subject: RE: Slow queries, need advice on how to improve; key_buffer? [snip] I tried to improve MySQL speed/performance by adding key_buff

RE: Slow queries, need advice on how to improve; key_buffer?

2005-01-07 Thread Tom Crimmins
[snip] I tried to improve MySQL speed/performance by adding key_buffer=50M to my my.cnf file for [mysqld]. When I restarted MySQL, I'm getting a "0 DB_ERROR_NOT_CONNECTED" error when visiting my php-MySQL web application via http. When I removed above and then restarted MySQL the error goes away.

RE: Slow queries, need advice on how to improve; key_buffer?

2005-01-07 Thread BD
ed both 64M and just 64. Should I also enter tick marks? I tried that too. BD -Original Message- From: Tom Crimmins [mailto:[EMAIL PROTECTED] Sent: Friday, January 07, 2005 11:20 AM To: BD Cc: mysql@lists.mysql.com Subject: RE: Slow queries, need advice on how to improve; key_buffer?

RE: Slow queries, need advice on how to improve; key_buffer?

2005-01-07 Thread Tom Crimmins
[snip] I tried to improve MySQL speed/performance by adding key_buffer=50M to my my.cnf file for [mysqld]. When I restarted MySQL, I'm getting a "0 DB_ERROR_NOT_CONNECTED" error when visiting my php-MySQL web application via http. When I removed above and then restarted MySQL the error goes away.

Re: Slow Queries on Fast Server?

2004-08-27 Thread Brent Baisley
If you are sorting the result, setting a limit only speeds things up for data transfer of the result set since MySQL still has to find all the records, sort them, then deliver only the first X records. You can usually tell how much time is spent on the transfer of the result set vs. finding the

Re: Slow Queries on Fast Server?

2004-08-27 Thread JVanV8
Thanks Brent and Donny, hopefully this info will help get to the root of the problem with the fulltext search. The table structure is very, very simple: mysql> describe product_fulltext; +-++--+-+-+---+ | Field | Type | Null | Key | Default | Extra

RE: Slow Queries on Fast Server?

2004-08-26 Thread Donny Simonton
TECTED] > Sent: Thursday, August 26, 2004 8:08 AM > To: [EMAIL PROTECTED] > Subject: Re: Slow Queries on Fast Server? > > I'm gathering by the lack of response that perhaps MySQL is incapable of > executing a count of the number of fulltext matches on 3 million rows. > I really th

Re: Slow Queries on Fast Server?

2004-08-26 Thread Brent Baisley
Capable? I can't think if why it wouldn't be capable. From your posts I assume your definition of "capable" in this case is a quick response. Are you running 4.0 or 4.1? I think the indexing was changed in 4.1 so it would give you better response. 5-20 seconds does seem long, assuming your

Re: Slow Queries on Fast Server?

2004-08-26 Thread JVanV8
I'm gathering by the lack of response that perhaps MySQL is incapable of executing a count of the number of fulltext matches on 3 million rows. I really thought that MySQL 4 was really suppose to be able to handle such a load I still think my configuration may be to blame ? - John

Re: Slow Queries on Fast Server?

2004-08-25 Thread JVanV8
>Could you send the output of an EXPLAIN for your query? Sure, pretty sure the index is fine though: mysql> EXPLAIN SELECT COUNT(*) FROM product_fulltext WHERE MATCH (search_text) AGAINST ('black'); +--+--+---+-+-+--+--+

Re: Slow Queries on Fast Server?

2004-08-25 Thread V. M. Brasseur
Could you send the output of an EXPLAIN for your query? --V [EMAIL PROTECTED] wrote: Have you checked the "Optimization" section of the manual yet? http://dev.mysql.com/doc/mysql/en/MySQL_Optimization.html Oh yes, as I've attempted to configure the my.cnf file for best performance. The query is c

Re: Slow Queries on Fast Server?

2004-08-25 Thread JVanV8
>Have you checked the "Optimization" section of the manual yet? >http://dev.mysql.com/doc/mysql/en/MySQL_Optimization.html Oh yes, as I've attempted to configure the my.cnf file for best performance. The query is correct. The fulltext index is correct as I built the fulltext index on the singl

Re: Slow Queries on Fast Server?

2004-08-25 Thread V. M. Brasseur
Have you checked the "Optimization" section of the manual yet? http://dev.mysql.com/doc/mysql/en/MySQL_Optimization.html It's probably the best place to start. Cheers, --V [EMAIL PROTECTED] wrote: I'm running into a problem with some queries running on a dedicated mysql server (2.0 GHz, 2GB RAM).

RE: slow queries

2002-11-12 Thread Black, Kelly W [PCS]
Make sure when you are creating the database that U_Number | int(9) unsigned | | PRI | NULL is U_Number | numeric() | | PRI | NULL -Original Message- From: Petre Agenbag [mailto:internet@;boesmanland.com] Sent: Tuesday, November 12, 2002 4:27 AM To: [E

Re: Slow queries

2002-07-27 Thread Bhavin Vyas
To: "Bhavin Vyas" <[EMAIL PROTECTED]> Sent: Friday, July 26, 2002 2:21 PM Subject: Re: Slow queries > At 05:53 PM 7/24/2002, you wrote: > >Hello, > >I am running mysql in our production environment, which have a few reporting > >tables with millions of row

RE: Slow queries

2002-07-24 Thread Lopez David E-r9374c
Bhavin I'm doing queries to one table with 4 other smaller tables. The large table is 12-14 million records. With an index, the table select is 13-15 seconds. With a compound index, the delay is sub one second. Use explain to verify which index is being used. Read the manual to tune your index's.