Home » Performance » MySQL » Selecting where id in (list of 1000 ids)
Selecting where id in (list of 1000 ids) [message #1086] Fri, 13 April 2007 03:02 Go to previous message
oordopjes  is currently offline oordopjes
Messages: 15
Registered: January 2007
Junior Member
Hi,

I'm trying to do the following select:
SELECT * FROM table WHERE id IN
(1,2,3..999,1000); (with other id numbers of course)

However, this query takes about 2 seconds. Is there any way to speed this up?

Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic:Integer overflow with UNSIGNED INT columns
Next Topic:More than 400 concurrent small queries
Goto Forum:

  


Current Time: Sun Jul 5 15:41:57 EDT 2009

Total time taken to generate the page: 0.00621 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 2.7.7.
Copyright ©2001-2007 FUD Forum Bulletin Board Software

MySQL is a trademark of Sun Microsystems.
InnoDB is a trademark of Oracle Corp.

Percona Performance Forums are a service of Percona, Inc.
Not affiliated with Sun Microsystems or Oracle Corp.