I thought there was a problem with RANDOM. I used:
    ,        ABS(RANDOM()) / CAST(1.4E18 AS INTEGER) AS Randomiser

And it seemed I got a lot of threes.

To check this I used:
    SELECT Randomiser
    ,      COUNT(*)   AS Count
    FROM (
        SELECT   date
        ,        ABS(RANDOM()) / CAST(1.4E18 AS INTEGER) AS Randomiser
        FROM     CPUUsage
        ORDER BY date
    )
    GROUP BY Randomiser
    ORDER BY Randomiser

And this gave results like:
    "0"    "165491"
    "1"    "166270"
    "2"    "166207"
    "3"    "165727"
    "4"    "165619"
    "5"    "165749"
    "6"    "98042"

So 6 is created less often as 0 - 5, but that is in my use case not a
problem.

This worked for me because I have a big table CPUUsage. But if I would not
have, is there another way to to do this?

-- 
Cecil Westerhof
_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to