[MDEV-29673] Feature Request: Support for "temporarily" deterministic functions for performance reasons Created: 2022-09-30  Updated: 2022-09-30

Status: Open
Project: MariaDB Server
Component/s: Data Definition - Procedure
Fix Version/s: None

Type: Task Priority: Major
Reporter: Markus Peter Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: None


 Description   

Non-Deterministic functions in a WHERE are re-executed for every potential matching row.

For cases where I believe the result of a function will not change while a query is currently running, it would be nice to be able to mark it as being somewhere being between deterministic and non-deterministic.

This is useful for cases where the result of the function depends on other tables or server variables but you still know, the result will not change for the current select, e.g. for cases, where you could normally do "set @variable=function(); SELECT .... WHERE @variable = 123"

Marking such a function as fully deterministic will speed up the query correctly, but might have unintended side effects on other parts of the system (for example binlogging).


Generated at Thu Feb 08 10:10:24 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.