We're Moving!

The Vertica Forum is moving to a new OpenText Analytics Database (Vertica) Community.

Join us there to post discussion topics, learn about

product releases, share tips, access the blog, and much more.

Create My New Community Account Now


ENABLE_WITH_CLAUSE_MATERIALIZATION bugged? — Vertica Forum

ENABLE_WITH_CLAUSE_MATERIALIZATION bugged?

dimitri_pdimitri_p
edited December 2024 in General Discussion

It looks to me like ENABLE_WITH_CLAUSE_MATERIALIZATION does something wrong when a CTE is using row_number/limit. For example, try these on some big table:

with /*+ENABLE_WITH_CLAUSE_MATERIALIZATION*/
preproc as
(select * from some_really_big_table limit 1)
select count(1) from preproc

with  /*+ENABLE_WITH_CLAUSE_MATERIALIZATION*/
preproc as
(select * from (select *,row_number() over() as rn from some_really_big_table) a where rn<2)
select count(1) from preproc

without the hint both of these queries return in a second or so. But with the hint they seem to take forever as if Vertica tries to materialize the entire big table.

Tested on Vertica 12.0.3

Tagged:

Answers

  • SruthiASruthiA Administrator

    Please create a support case and share the reproducer so that we can review it further.

This discussion has been closed.