Allow to use index when GROUP BY on field which has DESCENDING index
--------------------------------------------------------------------
Key: CORE-4529
URL: http://tracker.firebirdsql.org/browse/CORE-4529
Project: Firebird Core
Issue Type: Improvement
Reporter: Pavel Zotov
SQL> recreate table t(x int, y int); commit;
SQL> insert into t select rand()*5, rand()*5 from rdb$types, rdb$types; commit;
SQL> create DESCENDING index t_x_desc on t(x); commit;
SQL> set planonly;
SQL> select x,max(y) from t group by x;
PLAN SORT (T NATURAL) -- ? :(
SQL> select x,min(y) from t group by x;
PLAN SORT (T NATURAL) -- ? :(
SQL> set planonly;
SQL> drop index t_x_desc; commit;
---------- compare when ASC index on this field: --------
SQL> create index t_x_asc on t(x); commit;
SQL> set planonly;
SQL> select x,max(y) from t group by x;
PLAN (T ORDER T_X_ASC)
SQL> select x,min(y) from t group by x;
PLAN (T ORDER T_X_ASC)
SQL> set planonly;
SQL> drop index t_x_asc; commit;
PS. LI-T3.0.0.31288
--
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
------------------------------------------------------------------------------
Slashdot TV.
Video for Nerds. Stuff that matters.
http://tv.slashdot.org/
Firebird-Devel mailing list, web interface at
https://lists.sourceforge.net/lists/listinfo/firebird-devel