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: +---+--+--+-+---+---