Optimize 1=0 and 0=1
--------------------

                 Key: CORE-6394
                 URL: http://tracker.firebirdsql.org/browse/CORE-6394
             Project: Firebird Core
          Issue Type: Improvement
          Components: Engine
    Affects Versions: 3.0.6
            Reporter: Jiri Cincura
            Priority: Minor


A lot of ORMs do `select ... from xyz where 0=1` when an empty result set is 
needed (either directly or as a part of subquery). Firebird at the moment does 
natural scan of the table and that can cause a lot of fetches when the table is 
big.

Obviously the superset would be to evaluate all "constant" expressions and 
"squash", but that might not be directly easily possible at the moment.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://tracker.firebirdsql.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel

Reply via email to