MySQL Forums
Forum List  »  Stored Procedures

Re: When is an INSERT DETERMINISTIC?
Posted by: Haravikk Mistral
Date: August 08, 2017 01:40AM

It's not actually clear, in particular:

> A routine that contains the NOW() function (or its synonyms) or RAND() is nondeterministic, but it might still be replication-safe.

It fails entirely to explain what this means; if it is strictly non-deterministic but also happens to be replication safe, then that suggests that marking the procedure DETERMINISTIC anyway shouldn't produce inconsistencies.

The big part that's unclear is what exactly "incorrectly" marking a procedure would do; there is no explanation for example of what the optimisations are.

For example, if my use of NOW() is only minor, and in my application it wouldn't matter if a few touch-only inserts are ignored, so long as one goes through every now and then (e.g- once an hour), then does it matter if the procedure is "incorrectly" optimised?

This is why the documentation is so woefully insufficient, as it fails to clarify any of this; it mentions features on the basis of "optimisations" and vague penalties that it never explains.

Options: ReplyQuote


Subject
Views
Written By
Posted
4804
August 06, 2017 01:21PM
1105
August 07, 2017 09:47PM
Re: When is an INSERT DETERMINISTIC?
783
August 08, 2017 01:40AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.