Re: Slow sorting

2005-12-20 Thread Felix Geerinckx
On 20/12/2005, Marcus Bointon wrote: > I have a table that contains around 400,000 simple names. It's > displaying a subset of them (perhaps 5,000) them a page at a time in > a web interface, sorted by name, so I have a query like this: > > SELECT * FROM names WHERE account=123 ORDER BY lastname,

RE: Slow sorting

2005-12-20 Thread SciBit MySQL Team
> -Original Message- > From: "Marcus Bointon" <[EMAIL PROTECTED]> [SNIPPED] > That takes 11 seconds to run. Without the order by it takes 0.13 sec. > I have simple indexes on both first name and last name (they are > sometimes searched separately). It strikes me that this is really >

RE: Slow sorting

2005-12-20 Thread Logan, David (SST - Adelaide)
ECTED] Sent: Tuesday, 20 December 2005 9:55 PM To: mysql@lists.mysql.com Subject: Slow sorting I have a table that contains around 400,000 simple names. It's displaying a subset of them (perhaps 5,000) them a page at a time in a web interface, sorted by name, so I have a query like thi

Slow sorting

2005-12-20 Thread Marcus Bointon
I have a table that contains around 400,000 simple names. It's displaying a subset of them (perhaps 5,000) them a page at a time in a web interface, sorted by name, so I have a query like this: SELECT * FROM names WHERE account=123 ORDER BY lastname, firstname LIMIT 0,30 That takes 11 sec