Non-deterministic is a definition for an algorithm that isn't guaranteed to return the same result for multiple executions, even with the same input. Results can vary from run to run
Questions tagged [non-deterministic]
6 questions
12
votes
1 answer
Why is casting a DATE field to VARCHAR datatype non-deterministic and is there a way to make it deterministic?
I'm trying to create an indexed view where the index is on a field in the view which is a hash of a bunch of the columns of the underlying table in the view.
Here's an example:
CREATE VIEW CoolHashedView WITH SCHEMABINDING AS
SELECT
…
J.D.
- 40,776
- 12
- 62
- 141
5
votes
2 answers
Why can't I persist binary(4) computed column?
I'm playing with storing and indexing IP addresses. I'm starting with a simple, stupid table:
CREATE TABLE [dbo].[IP_addresses](
[IP_as_text] [char](16) NOT NULL,
[IP] AS ([dbo].[fnBinaryIPv4]([IP_as_text]))
) ON [PRIMARY]
Where…
Chris Nelson
- 241
- 2
- 10
4
votes
2 answers
Are table-valued functions deterministic with regard to insertion order?
Is insertion order deterministic in a TABLE-valued function which instantiates the table and populates it with successive inserts, assuming no ORDER BY clause is used?
I needed to take a look at the range of Unicode characters in use in a given…
Tim
- 545
- 4
- 13
4
votes
2 answers
Deterministic function for getting today's date
I am trying to create an indexed view using the following code (so that I can publish it to replication it as a table):
CREATE VIEW lc.vw_dates
WITH SCHEMABINDING
AS
SELECT DATEADD(day, DATEDIFF(day, 0, GETDATE()), number) AS SettingDate
FROM…
bbailes
- 159
- 2
- 7
3
votes
1 answer
How can I identify non deterministic updates occurring in my SQL Server?
SQL Server books online states
Use caution when specifying the FROM clause to provide the criteria
for the update operation. The results of an UPDATE statement are
undefined if the statement includes a FROM clause that is not
specified in…
OzzieDBA
- 33
- 3
1
vote
2 answers
Non-deterministic functions and row-based binary logging (MySQL)
Newbie questions. I'm working on a MySQL project that will use only row-level binary logging. There will be no replication. Since logging is row-level, does it even matter if a function is deterministic? From the manual, my understanding is that it…
Mike Blyth
- 123
- 4