On Jan 27, 11:33 am, "Novice Programmer" <[EMAIL PROTECTED]>
wrote:
> Hello AD,
>
> Wont this query be slow?
No.
> Lets say that i have first valid image at index 1
> and the next one at the index 1000. How would this query perform?
SELECT * from images WHERE status = 1 AND id > $thisOne ORDER BY id
asc LIMIT 1
If you think that's going to be slow it's time to pick up a book on
sql.
If in your case that is slow you are missing an index, have a lot more
than 1000 rows and probably have some kind of serious DB problem ;)
hth,
AD
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake
PHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---