Re: [sqlite] random value get re-generated too often in SQLite

2017-12-10 Thread Luuk
On 08-12-17 23:34, Scott Doctor wrote: > > Is it possible that the first call to random is cached and the cached > value is being returned in subsequent calls? > > - > Scott Doctor > sc...@scottdoctor.com > - > The easiest way to get this behaviour i

Re: [sqlite] random value get re-generated too often in SQLite

2017-12-08 Thread Scott Doctor
Is it possible that the first call to random is cached and the cached value is being returned in subsequent calls? - Scott Doctor sc...@scottdoctor.com - On 12/8/2017 12:09, John McKown wrote: On Fri, Dec 8, 2017 at 12:54 PM, John Mount wrote:

Re: [sqlite] random value get re-generated too often in SQLite

2017-12-08 Thread John McKown
On Fri, Dec 8, 2017 at 12:54 PM, John Mount wrote: > I am seeing an issue where a random value in a sub-query gets re-generated > each time the value is used in later queries. Below is an example query: > > SELECT r AS r1, r AS r2 FROM ( SELECT random() AS r FROM ( SELECT * from ( > VALUES(1),(2

[sqlite] random value get re-generated too often in SQLite

2017-12-08 Thread John Mount
I am seeing an issue where a random value in a sub-query gets re-generated each time the value is used in later queries. Below is an example query: SELECT r AS r1, r AS r2 FROM ( SELECT random() AS r FROM ( SELECT * from ( VALUES(1),(2) ) ) a ) b One would expect r1 == r2. --- Joh