Glad to know that....could that possibly be mentioned in the random() notes on 
the core functions?  Thought that is (apparently) a C function and not SQL 
accessible?







Michael D. Black

Senior Scientist

Advanced Analytics Directorate

Advanced GEOINT Solutions Operating Unit

Northrop Grumman Information Systems

________________________________
From: sqlite-users-boun...@sqlite.org [sqlite-users-boun...@sqlite.org] on 
behalf of Simon Davies [simon.james.dav...@gmail.com]
Sent: Thursday, March 08, 2012 8:33 AM
To: General Discussion of SQLite Database
Subject: EXT :Re: [sqlite] Efficient random sampling in a large table using 
builtin functions.

On 8 March 2012 14:20, Black, Michael (IS) <michael.bla...@ngc.com> wrote:
> You don't say what language you are working in.  IN C++ I would just declare 
> a "set" and put random row numbers in it until I had enough.  Then use that 
> set to build the SQL.
>
> SQLite's random() doesn't have a seed function so you don't really get very 
> random numbers from run-to-run and have no good way of controlling it that I 
> can find in the docs.  You want to use your language's random function if you 
> want anything close to real randomness.

http://www.sqlite.org/c3ref/randomness.html claims high-quality PRNG

>
> Hopefully your language has a similar data structure you can use.
>
>
> Michael D. Black
>
> Senior Scientist
>
> Advanced Analytics Directorate
>
> Advanced GEOINT Solutions Operating Unit
>
> Northrop Grumman Information Systems
>
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to