raja kumar thatte <[EMAIL PROTECTED]> writes: > I want to know how the--where condition--is executed in a sql query. > e.g., select aa,bb,cc from ttt where aa=100 and bb = 200 and cc =300. > my doubt is , will psql leave the record as on when it fails to satisfy a record >having aa !=100 > or will it chect for bb = 200 and cc = 300 also. > ie will it work like C-language if condition or not. > If i give paranthesis, will it change the execution plan accordingly.
The planner will make its own decisions about which query plan to follow; it's quite impervious to parentheses, clause order, or any other semantically-insignificant details in the WHERE clause. You may care to read the chapter on performance tips in the User's Guide. regards, tom lane ---------------------------(end of broadcast)--------------------------- TIP 6: Have you searched our list archives? http://archives.postgresql.org