databend icon indicating copy to clipboard operation
databend copied to clipboard

Feature: eliminate constant subquery

Open Dousir9 opened this issue 1 year ago • 0 comments

Summary

For the following case:

CREATE TABLE date_sub_query_test (
ID BIGINT NULL,
test_time timestamp NULL
)
explain select * from date_sub_query_test where test_time >= (select now());

We can eliminate the constant subquery and avoid join.

Dousir9 avatar Mar 19 '24 09:03 Dousir9