Re: Simple query slow on large table

2009-08-18 Thread Perrin Harkins
On Tue, Aug 18, 2009 at 5:08 AM, Simon Kimber wrote: > I have indexes on siteid, datestamp and msgtype. > > Queries such as the following are constantly appearing in the slow > queries log: > > SELECT * FROM enquiries WHERE siteid = 59255 AND msgtype = 0 ORDER BY > datestamp DESC LIMIT 5; Read the

Re: Simple query slow on large table

2009-08-18 Thread walter harms
Simon Kimber schrieb: > Hi Everyone, > > I'm having a very simple query often take several seconds to run and > would be hugely grateful for any advice on how i might spped this up. > > The table contains around 500k rows and the structure is as follows: > > +---+--+

Simple query slow on large table

2009-08-18 Thread Simon Kimber
Hi Everyone, I'm having a very simple query often take several seconds to run and would be hugely grateful for any advice on how i might spped this up. The table contains around 500k rows and the structure is as follows: +---+--+--+-+---+---

RE: Fulltext index -first query slow, subsequent queries fast

2008-06-13 Thread Boyd, Todd M.
> -Original Message- > From: Ananda Kumar [mailto:[EMAIL PROTECTED] > Sent: Friday, June 13, 2008 10:48 AM > To: [EMAIL PROTECTED] > Cc: mos; mysql@lists.mysql.com > Subject: Re: Fulltext index -first query slow, subsequent queries fast > > Hi > > Is sphi

Re: Fulltext index -first query slow, subsequent queries fast

2008-06-13 Thread Ananda Kumar
Hi Is sphinxsearch avialable only on for windows regards anandkl On 6/13/08, Rory McKinley <[EMAIL PROTECTED]> wrote: > > mos wrote: > > >> Why not switch to Sphinx full text search for MySQL? It is faster and can >> handle more data than MySQL's built in fulltext search. >> http://www.sphinxsea

Re: Fulltext index -first query slow, subsequent queries fast

2008-06-12 Thread Rory McKinley
mos wrote: Why not switch to Sphinx full text search for MySQL? It is faster and can handle more data than MySQL's built in fulltext search. http://www.sphinxsearch.com/ Mike I have read about sphinx and the good performance boost it provides - unfortunately there is a lot of legacy code

Re: Fulltext index -first query slow, subsequent queries fast

2008-06-12 Thread mos
At 02:20 PM 6/12/2008, you wrote: Hi List I have a table with a fulltext index across five fields, with about 2.2 million records and a data size of about 5.6 GB (index another 3.5 GB). When I test a query that uses fulltext matching, the first run takes about 15-16 seconds to complete. The s

RE: Fulltext index -first query slow, subsequent queries fast

2008-06-12 Thread Jerry Schwartz
>From: Rory McKinley [mailto:[EMAIL PROTECTED] >Sent: Thursday, June 12, 2008 4:57 PM >To: Jerry Schwartz; mysql >Subject: Re: Fulltext index -first query slow, subsequent queries fast > >Jerry Schwartz wrote: >> File system, or disk caching, uses some kind of algorithm to

Re: Fulltext index -first query slow, subsequent queries fast

2008-06-12 Thread Rory McKinley
Jerry Schwartz wrote: File system, or disk caching, uses some kind of algorithm to hold chunks of files in system RAM. That way a program can get to it more quickly than if it had to go out to the disk. The algorithms vary, depending upon the smarts of the program and the smarts of the file syste

RE: Fulltext index -first query slow, subsequent queries fast

2008-06-12 Thread Jerry Schwartz
>-Original Message- >From: Rory McKinley [mailto:[EMAIL PROTECTED] >Sent: Thursday, June 12, 2008 3:20 PM >To: mysql >Subject: Fulltext index -first query slow, subsequent queries fast > >Hi List > >I have a table with a fulltext index across five fields, with

Fulltext index -first query slow, subsequent queries fast

2008-06-12 Thread Rory McKinley
Hi List I have a table with a fulltext index across five fields, with about 2.2 million records and a data size of about 5.6 GB (index another 3.5 GB). When I test a query that uses fulltext matching, the first run takes about 15-16 seconds to complete. The second run takes about 0.1 sec and

Re: query slow

2006-06-25 Thread luiz Rafael
Hello friends Id like to thanks all friends that helped with this question Regards Luiz -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

Re: query slow

2006-06-21 Thread Eugene Kosov
luiz Rafael wrote: SELECT * FROM `sav00_sava0400_dbf` WHERE 2000 = YEAR(`emissao`) OR (1999 = YEAR(`emissao`) AND 12 < MONTH(`emissao`)) ORDER BY emissao ASC Are you sure this is what you really want? MONTH() is never greater than 12, so your query is equal to: SELECT * FROM `sav00_sav

Re: query slow

2006-06-21 Thread Eugene Kosov
Jay Pipes wrote: SELECT * FROM `sav00_sava0400_dbf` emissao BETWEEN '2000-01-01' AND '2000-12-31' UNION ALL SELECT * FROM `sav00_sava0400_dbf` emissao BETWEEN '1999-12-01' AND '1999-12-31' Why not: SELECT * FROM `sav00_sava0400_dbf` emissao BETWEEN '1999-12-01' AND '2000-12-31' ?? ;) -

Re: query slow

2006-06-21 Thread luiz Rafael
Hi Jay Thanks for the help Regards Luiz -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

Re: query slow

2006-06-21 Thread Jay Pipes
luiz Rafael wrote: Dear friends is their any way to optimize this query bellow, it take +- 2minutes do complete, i think it becouse their no index by the emissao field SELECT * FROM `sav00_sava0400_dbf` WHERE 2000 = YEAR(`emissao`) OR (1999 = YEAR(`emissao`) AND 12 < MONTH(`emissao`)) O

query slow

2006-06-21 Thread luiz Rafael
Dear friends is their any way to optimize this query bellow, it take +- 2minutes do complete, i think it becouse their no index by the emissao field SELECT * FROM `sav00_sava0400_dbf` WHERE 2000 = YEAR(`emissao`) OR (1999 = YEAR(`emissao`) AND 12 < MONTH(`emissao`)) ORDER BY emissao ASC

Re: Similar simple query slow down dramatically, by just select one more field, why?

2004-02-18 Thread Oscar Yen
N¬™ë,j°jËkj{zºÞw­…«k‰©oz»"¢z ‰¦ºx†j×­˜úèThanks for reply. - Original Message - From: "Ludwig Pummer" <[EMAIL PROTECTED]> To: "Oscar Yen" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Thursday, February 19, 2004 8:39 AM Subject: Re: Simi

Re: Similar simple query slow down dramatically, by just select one more field, why?

2004-02-18 Thread Ludwig Pummer
Oscar Yen wrote: create table a ( imgid int not null, parent int, imgtype char(3), img longtext, primary key (imgid), key searchkey (parent, imgid) ) type = innodb; T1) select imgid, parent from a where parent = 10; returns 3357 rows in 0.08 sec. T2) select imgid, parent, imgtype fr

Similar simple query slow down dramatically, by just select one more field, why?

2004-02-18 Thread Oscar Yen
N¬™ë,j°jËkj{zºÞw­…«k‰©oz»"¢z ‰¦ºx†j×­˜úèDear all, I have asked the question days before, but no one seems interested in it Considering table imgstore, defined as create table a ( imgid int not null, parent int, imgtype char(3), img longtext, primary key (imgid), key searchke

Re: Query fast via mysql CLI, Same query slow via Perl DBI

2004-02-13 Thread gerald_clark
Daniel J. Conlon wrote: Hi, When executing this query through the 'mysql' command line utility, the result is returned from the database server immediately and the database server does not create a temporary file. (SELECT domains.domain,accounts.owner,accounts.type,accounts.server,accounts.win

Query fast via mysql CLI, Same query slow via Perl DBI

2004-02-13 Thread Daniel J. Conlon
Hi, When executing this query through the 'mysql' command line utility, the result is returned from the database server immediately and the database server does not create a temporary file. (SELECT domains.domain,accounts.owner,accounts.type,accounts.server,accounts.win server,zone_records.record

query slow on join and order by

2002-10-15 Thread Norris, Joseph
Group, Here is my query: explain select phones.*, ops.plid, ops.box, ops.mac from phones, ops where (ops.box = 'Mcds') or (ops.box = 'Mn3300') and (phones.suffix1 = ops.phone) order by ops.mac My describe of the phones table and the ops table: Phones: ++--+--+-

Re: Query slow (again)

2002-05-14 Thread Gelu Gogancea
ior" <[EMAIL PROTECTED]> To: "MYSQL" <[EMAIL PROTECTED]> Sent: Tuesday, May 14, 2002 8:31 PM Subject: Query slow (again) > Hi, > > I have changed my query but it is so slow :( Please, help me! > > Thank u very much! > Edilson. > > -

Query slow (again)

2002-05-14 Thread Edilson Vasconcelos de Melo Junior
Hi, I have changed my query but it is so slow :( Please, help me! Thank u very much! Edilson. - Query -> SELECT a.idemail, a.fklastresp FROM wmkt_email a, wmkt_client b, wmkt_maillist_client c LEFT JOIN