You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.
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;
Submitted by: @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
Commits: 40c7b29
The text was updated successfully, but these errors were encountered: