jakebur01 Posted August 15, 2007 Share Posted August 15, 2007 i have a table with a lot of extra columns that I don't use. If i delete those extra columns will it allow php to run faster? Quote Link to comment https://forums.phpfreaks.com/topic/64986-solved-query-question/ Share on other sites More sharing options...
dbo Posted August 15, 2007 Share Posted August 15, 2007 Nope, it's more of a database issue. But if you're sucking back a bunch of fields you don't need and iterating over them that could potentially slow things down. I suggest always writing your queries to only select out the fields you need. Avoid using SELECT *. Quote Link to comment https://forums.phpfreaks.com/topic/64986-solved-query-question/#findComment-324334 Share on other sites More sharing options...
Fadion Posted August 15, 2007 Share Posted August 15, 2007 If ure using everywhere in your script "SELECT column1, column2 FROM table" then ure ok, but if ure selecting * i think ull have faster queries. Also when u dont need smth, why keep it. Quote Link to comment https://forums.phpfreaks.com/topic/64986-solved-query-question/#findComment-324335 Share on other sites More sharing options...
rameshfaj Posted August 15, 2007 Share Posted August 15, 2007 It depends on your query.If there are unnecessary information that u are selecting from the tables,then it is better to select only required one.This itself filters the data from the database. If u are selecting all the entries from the table better do only required selection, this will make the query optimal and less overhead,so the connection returns faster and the script can proceed further,so seems some faster. Quote Link to comment https://forums.phpfreaks.com/topic/64986-solved-query-question/#findComment-324345 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.