Subquery-based predicates are not evaluated early in the join order [CORE1549] #1966
Submitted by: @dyemanov
Is related to QA164
When you have a join and a WHERE clause containing an EXISTS predicate that refers to the first joined stream, that EXISTS predicate could be evaluated early (right after the first stream is fetched), but in fact it's evaluated later (after the second stream is fetched) thus not being able to filter the unnecessary rows out from the join in advance and reduce the execution time. This is a regression introduced in v1.5.
create table TEST(ID integer not null);
insert into TEST(id) values (gen_id(GEN_TEST, 1));
insert into TEST (id) select gen_id(GEN_TEST, 1) from TEST where gen_id(GEN_TEST, 0) < 2000;
-- Now try this statement:
-- A few thousands of page fetches are okay, while 12 millions are definitely not.
====== Test Details ======
::: NB ::: Test uses EXPLAINED form of plan. Letter from dimitr: 11-mar-2015 19:58.
The text was updated successfully, but these errors were encountered: