> SELECT TEST.ID FROM TABLE_DISTINCT(TEMP_VIEW_20_X INTEGER=(1, 2, NULL)) TEMP_VIEW_21 /* PUBLIC."" */ INNER JOIN PUBLIC.TEST /* PUBLIC.PRIMARY_KEY_2: ID >= 1 AND ID <= 2 AND ID = TEMP_VIEW_21.TEMP_VIEW_20_X */ ON 1=1 WHERE (ID IN(1, 2, NULL)) AND (ID = TEMP_VIEW_21.TEMP_VIEW_20_X)
> SELECT TEST.ID FROM TABLE_DISTINCT(TEMP_VIEW_21_X INTEGER=(1, 2, NULL)) TEMP_VIEW_22 /* PUBLIC."" */ INNER JOIN PUBLIC.TEST /* PUBLIC.PRIMARY_KEY_2: ID >= 1 AND ID <= 2 AND ID = TEMP_VIEW_22.TEMP_VIEW_21_X */ ON 1=1 WHERE (ID IN(1, 2, NULL)) AND (ID = TEMP_VIEW_22.TEMP_VIEW_21_X)
> rows: 1
drop table test;
...
...
@@ -2536,7 +2554,7 @@ select * from test t1 where id in(id);
explain select * from test t1 where id in(select id from test);
> SELECT T1.ID, T1.NAME FROM (SELECT DISTINCT ID AS TEMP_VIEW_70_X FROM PUBLIC.TEST /* PUBLIC.TEST_TABLE_SCAN */) TEMP_VIEW_71 /* SELECT DISTINCT ID AS TEMP_VIEW_70_X FROM PUBLIC.TEST /++ PUBLIC.TEST_TABLE_SCAN ++/ */ INNER JOIN PUBLIC.TEST T1 /* PUBLIC.PRIMARY_KEY_2: ID = TEMP_VIEW_71.TEMP_VIEW_70_X */ ON 1=1 WHERE ID = TEMP_VIEW_71.TEMP_VIEW_70_X
> SELECT T1.ID, T1.NAME FROM (SELECT DISTINCT ID AS TEMP_VIEW_71_X FROM PUBLIC.TEST /* PUBLIC.TEST_TABLE_SCAN */) TEMP_VIEW_72 /* SELECT DISTINCT ID AS TEMP_VIEW_71_X FROM PUBLIC.TEST /++ PUBLIC.TEST_TABLE_SCAN ++/ */ INNER JOIN PUBLIC.TEST T1 /* PUBLIC.PRIMARY_KEY_2: ID = TEMP_VIEW_72.TEMP_VIEW_71_X */ ON 1=1 WHERE ID = TEMP_VIEW_72.TEMP_VIEW_71_X
> rows: 1
select * from test t1 where id in(select id from test);
...
...
@@ -2549,7 +2567,7 @@ select * from test t1 where id in(select id from test);
explain select * from test t1 where id in(1, select max(id) from test);
> SELECT T1.ID, T1.NAME FROM TABLE_DISTINCT(TEMP_VIEW_78_X INTEGER=(1, 2)) TEMP_VIEW_79 /* PUBLIC."" */ INNER JOIN PUBLIC.TEST T1 /* PUBLIC.PRIMARY_KEY_2: ID >= 1 AND ID <= 2 AND ID = TEMP_VIEW_79.TEMP_VIEW_78_X */ ON 1=1 WHERE (ID IN(1, 2)) AND (ID = TEMP_VIEW_79.TEMP_VIEW_78_X)
> SELECT T1.ID, T1.NAME FROM TABLE_DISTINCT(TEMP_VIEW_79_X INTEGER=(1, 2)) TEMP_VIEW_80 /* PUBLIC."" */ INNER JOIN PUBLIC.TEST T1 /* PUBLIC.PRIMARY_KEY_2: ID >= 1 AND ID <= 2 AND ID = TEMP_VIEW_80.TEMP_VIEW_79_X */ ON 1=1 WHERE (ID IN(1, 2)) AND (ID = TEMP_VIEW_80.TEMP_VIEW_79_X)
> rows: 1
select * from test t1 where id in(1, select max(id) from test);
...
...
@@ -5452,13 +5470,13 @@ EXPLAIN PLAN FOR SELECT * FROM TEST T1 WHERE EXISTS(SELECT * FROM TEST T2 WHERE
EXPLAIN PLAN FOR SELECT * FROM TEST T1 WHERE ID IN(1, 2);
> SELECT T1.ID, T1.NAME FROM TABLE_DISTINCT(TEMP_VIEW_115_X INTEGER=(1, 2)) TEMP_VIEW_116 /* PUBLIC."" */ INNER JOIN PUBLIC.TEST T1 /* PUBLIC.PRIMARY_KEY_2: ID >= 1 AND ID <= 2 AND ID = TEMP_VIEW_116.TEMP_VIEW_115_X */ ON 1=1 WHERE (ID IN(1, 2)) AND (ID = TEMP_VIEW_116.TEMP_VIEW_115_X)
> SELECT T1.ID, T1.NAME FROM TABLE_DISTINCT(TEMP_VIEW_116_X INTEGER=(1, 2)) TEMP_VIEW_117 /* PUBLIC."" */ INNER JOIN PUBLIC.TEST T1 /* PUBLIC.PRIMARY_KEY_2: ID >= 1 AND ID <= 2 AND ID = TEMP_VIEW_117.TEMP_VIEW_116_X */ ON 1=1 WHERE (ID IN(1, 2)) AND (ID = TEMP_VIEW_117.TEMP_VIEW_116_X)
> rows: 1
EXPLAIN PLAN FOR SELECT * FROM TEST T1 WHERE ID IN(SELECT ID FROM TEST);
> SELECT T1.ID, T1.NAME FROM (SELECT DISTINCT ID AS TEMP_VIEW_119_X FROM PUBLIC.TEST /* PUBLIC.TEST_TABLE_SCAN */) TEMP_VIEW_120 /* SELECT DISTINCT ID AS TEMP_VIEW_119_X FROM PUBLIC.TEST /++ PUBLIC.TEST_TABLE_SCAN ++/ */ INNER JOIN PUBLIC.TEST T1 /* PUBLIC.PRIMARY_KEY_2: ID = TEMP_VIEW_120.TEMP_VIEW_119_X */ ON 1=1 WHERE ID = TEMP_VIEW_120.TEMP_VIEW_119_X
> SELECT T1.ID, T1.NAME FROM (SELECT DISTINCT ID AS TEMP_VIEW_120_X FROM PUBLIC.TEST /* PUBLIC.TEST_TABLE_SCAN */) TEMP_VIEW_121 /* SELECT DISTINCT ID AS TEMP_VIEW_120_X FROM PUBLIC.TEST /++ PUBLIC.TEST_TABLE_SCAN ++/ */ INNER JOIN PUBLIC.TEST T1 /* PUBLIC.PRIMARY_KEY_2: ID = TEMP_VIEW_121.TEMP_VIEW_120_X */ ON 1=1 WHERE ID = TEMP_VIEW_121.TEMP_VIEW_120_X
> rows: 1
EXPLAIN PLAN FOR SELECT * FROM TEST T1 WHERE ID NOT IN(SELECT ID FROM TEST);