- #1
- 7,019
- 10,579
Hi all,
Just curious as to whether it is a good rule of thumb ( though not an actual rule) that out of two effective queries
(i.e., two queries q1, q2 that return the desired result) , the query that is shortest as a string, i.e., has the fewest total words, will run faster? I understand the speed will depend on many factors like clauses used (each of which has a big-O speed itself), size of database, etc. , still, is this good as a hard-and-fast rule that the shortest query will be faster? Is there a nice way of doing an approximation of running time?
Just curious as to whether it is a good rule of thumb ( though not an actual rule) that out of two effective queries
(i.e., two queries q1, q2 that return the desired result) , the query that is shortest as a string, i.e., has the fewest total words, will run faster? I understand the speed will depend on many factors like clauses used (each of which has a big-O speed itself), size of database, etc. , still, is this good as a hard-and-fast rule that the shortest query will be faster? Is there a nice way of doing an approximation of running time?