New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow NULLS LAST in CREATE INDEX [CORE5914] #6172
Comments
Modified by: @livius2description: 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 or SELECT now plan looks like => Add posiibility to specify NULLS LAST/NULLS FIRST directive in index creation CREATE ASCENDING INDEX IXA_TABLE_FIELD ON TABLE(FIELD) NULLS LAST; this will help in queries like this SELECT or SELECT now plan looks like |
Commented by: Sean Leyne (seanleyne) Please confirm, what is the PLAN for the first query? |
Commented by: @livius2 Natural. But i have thinked about the ticket and including this into index definition will not be relevant. |
Commented by: Attila Molnár (e_pluribus_unum) |
Modified by: Sean Leyne (seanleyne)status: Open [ 1 ] => Resolved [ 5 ] resolution: Duplicate [ 3 ] |
Modified by: @pcisarstatus: Resolved [ 5 ] => Closed [ 6 ] |
Submitted by: @livius2
Duplicates CORE4266
Add posiibility to specify NULLS LAST/NULLS FIRST 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
The text was updated successfully, but these errors were encountered: