Is the order which we specify in the where cluse of any SQL query will impact the performance? We are using oracle11g version.
Please help me out, thanks in advance.
In general sql the order in which WHERE is evaluated are like:1. Subqueries in WHERE clause are evaluated first (NOTE: Subqueries make SQL query slow)
2. All the boolean function are evaluated in reverse order.
Also indexing the cloumns used in WHERE clause make the query faster. The optimizer will go to indexed cloumns first so instead of looking through each cloumn of the table optimizer will go to indexed columns.
Adding LIKE, RLIKE, and other stored functions increase load on WHERE clause of the query.
GENERAL TIP: Instead of picking large number of rows at once one should use LIMIT to get limited results faster than getting large number of rows.
Sign up for STechies