Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve performance of CURRENT_TIME #7092

Closed
asfernandes opened this issue Jan 4, 2022 · 0 comments
Closed

Improve performance of CURRENT_TIME #7092

asfernandes opened this issue Jan 4, 2022 · 0 comments

Comments

@asfernandes
Copy link
Member

As conversion from TIMESTAMP to TIME (both WITH TIME ZONE) is not a trivial operation, caching its converted value in the request makes ~15x improvement in its performance in my tests.

Test case:

execute block
as
    declare n integer = 1;
    declare d time with time zone;
begin
    while (n < 1000000)
    do
    begin
        n = n + 1;
        d = current_time;
    end
end!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment