Skip to content

Improve performance of CURRENT_TIME #7092

@asfernandes

Description

@asfernandes

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!

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions