Allow NULLS LAST in CREATE INDEX
--------------------------------

                 Key: CORE-5914
                 URL: http://tracker.firebirdsql.org/browse/CORE-5914
             Project: Firebird Core
          Issue Type: Improvement
          Components: Engine
            Reporter: Karol Bieniaszewski


Add posiibility to specify NULLS LAST/NULLS FIRS directive in index creation

CREATE ASCENDING INDEX IXA_TABLE_FIELD ON TABLE(FIELD) NULLS LAST;

this will help in queries like this

SELECT
*
FROM
TABLE
ORDER BY FIELD NULLS LAST

or

SELECT
*
FROM
TABLE
WHERE
FIELD IS NOT NULL
ORDER BY FIELD

now plan looks like 
PLAN (TABLE ORDER IXA_TABLE_FIELD) 
which is not efficient because first in index are nulls
But if table have most of nulls but for e.g. 1% contain data, this plan is 
inefficient

-- 
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