On Sat, Dec 29, 2018, 07:17 Mark Rotteveel <m...@lawinegevaar.nl wrote:

> I was doing an artificial performance test on Firebird by inserting into
> a table that had a column
>
> updatedts timestamp default localtimestamp
>
> The insert did not touch this column (so the default is applied). To my
> surprise, that was about 7 - 10 % slower than using CURRENT_TIMESTAMP:
>
> updatedts timestamp default current_timestamp
>
> Why is that?
>
> I'd expect equivalent performance, or otherwise the reverse given the
> current_timestamp timestamp with time zone value needs to be converted
> to a timestamp without time zone.
>


The cached in request value is now the timestamp with tz, then
localtimestamp requires a conversion.

That conversion requires to open ICU calendar to get the effective
displacement.

Please try to alter the session time zone to a displacement (set time zone
'-02:00') and see if the performance drop is equivalent.


Adriano
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel

Reply via email to