Would this be slower:
thanCode:SELECT * FROM `table` WHERE script_id = '$script_id' AND id = '$id'
ifCode:SELECT * FROM `table` WHERE id = '$id'was the indexing factor?Code:id
| SitePoint Sponsor |





Would this be slower:
thanCode:SELECT * FROM `table` WHERE script_id = '$script_id' AND id = '$id'
ifCode:SELECT * FROM `table` WHERE id = '$id'was the indexing factor?Code:id
Have a good day.

the first statement would be faster because your index on id would be used AND you're returning fewer rows.
Check out our new Industry News forum!
Keep up-to-date with the latest SP news in the Community Crier
I edit the SitePoint Podcast
Bookmarks