You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For now EXTRACT function takes argument with EvalTypetypes.ETString, which means it will do ParseDatetime for each evaluation.
This inefficient way was introduced by #21601. It fixed a compatibility issue but brought serious performance degradation when argument's type is types.ETDatetime(which is the most common case, IMO 😝), since ParseDatetime is very costly.
I suggest we can add a new extract funciton signature like builtinExtractDatetimeFromStringSig to handle the corner case fixed by #21601, i.e. EXTRACT from a TIME string literal.
In TPCH Query 9, there is a EXTRACT(YEAR FROM orders.o_orderdate), where o_orderdate is a DATE field. We can compare performance of builtinExtractDatetimeFromStringSig and builtinExtractDatetimeSig with this workload.
Here's a simplified benchmark(with branch leiysky@5986878) on TPCH SF1 data set:
For now EXTRACT function takes argument with EvalType
types.ETString
, which means it will do ParseDatetime for each evaluation.This inefficient way was introduced by #21601. It fixed a compatibility issue but brought serious performance degradation when argument's type is
types.ETDatetime
(which is the most common case, IMO 😝), since ParseDatetime is very costly.I suggest we can add a new extract funciton signature like
builtinExtractDatetimeFromStringSig
to handle the corner case fixed by #21601, i.e. EXTRACT from a TIME string literal.In TPCH Query 9, there is a
EXTRACT(YEAR FROM orders.o_orderdate)
, whereo_orderdate
is a DATE field. We can compare performance ofbuiltinExtractDatetimeFromStringSig
andbuiltinExtractDatetimeSig
with this workload.Here's a simplified benchmark(with branch leiysky@5986878) on TPCH SF1 data set:
The text was updated successfully, but these errors were encountered: