isaac_cm Posted May 28, 2008 Share Posted May 28, 2008 Hello, I need expert advice about which is faster for a stored procedure in my database (about 200,000 records) if I use 2 Select statements or use for select that return 2 rows ? P.S: I created indexes for fields in the where clause. Thanks Link to comment https://forums.phpfreaks.com/topic/107645-which-is-faster-2-selects-for-1-for-select-with-2-rows/ Share on other sites More sharing options...
amites Posted May 28, 2008 Share Posted May 28, 2008 try it both ways and include a print out of how long the query took to execute run it a few dozen times each way and walah Link to comment https://forums.phpfreaks.com/topic/107645-which-is-faster-2-selects-for-1-for-select-with-2-rows/#findComment-552166 Share on other sites More sharing options...
isaac_cm Posted May 29, 2008 Author Share Posted May 29, 2008 I mean in general does 2 select faster than 1 for select with 2 rows ? Link to comment https://forums.phpfreaks.com/topic/107645-which-is-faster-2-selects-for-1-for-select-with-2-rows/#findComment-552228 Share on other sites More sharing options...
fenway Posted May 29, 2008 Share Posted May 29, 2008 I mean in general does 2 select faster than 1 for select with 2 rows ? Depends on the query and the data... more info please? Link to comment https://forums.phpfreaks.com/topic/107645-which-is-faster-2-selects-for-1-for-select-with-2-rows/#findComment-552700 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.