\set ECHO none add_provenance (1 row) q|exact|probabilities top 2|t|1=0.0900 2=0.5000 3=0.5600 4=0.4000 5=0.0616 6=0.3402 (1 row) q|exact|probabilities first|t|1=0.0080 2=0.0160 3=0.0112 4=0.0019 5=0.6000 6=0.3600 (1 row) q|exact|probabilities OFFSET and LIMIT|t|1=0.1920 2=0.4300 3=0.4326 4=0.1313 5=0.0000 6=0.5400 (1 row) q|exact|probabilities OFFSET alone|t|1=0.1080 2=0.3120 3=0.5572 4=0.3710 5=0.0000 6=0.0000 (1 row) q|exact|probabilities after a selection, NULLs first|t|1=0.2000 2=0.5000 3=0.6300 4=0.2200 (1 row) q|exact|probabilities several keys|t|1=0.1720 2=0.5000 3=0.7000 4=0.4000 5=0.2508 6=0.7002 (1 row) q|exact|probabilities DISTINCT ON|t|1=0.0180 2=0.3000 3=0.2100 4=0.4000 5=0.0600 6=0.9000 (1 row) q|exact|probabilities DISTINCT ON, then LIMIT|t|1=0.2000 2=0.4000 3=0.2800 4=0.0480 5=0.0432 6=0.0259 (1 row) q|exact|probabilities DISTINCT ON a key other than the first|t|a=0.8560 b=0.9000 (1 row) q|exact|probabilities top 1 per group, LATERAL|t|a:1=0.0180 a:2=0.3000 a:3=0.2100 a:4=0.4000 b:5=0.0600 b:6=0.9000 (1 row) q|exact|probabilities in a CTE, then filtered|t|1=0.1720 2=0.5000 3=0.7000 5=0.2508 6=0.7002 (1 row) q|exact|probabilities arms of UNION ALL|t|1=0.0260 2=0.3160 3=0.2212 4=0.4019 5=0.6043 6=0.4248 (1 row) q|exact|probabilities arm of UNION|t|1=0.0180 2=0.3000 3=0.2100 4=0.4000 5=0.6000 6=0.9000 (1 row) q|exact|probabilities two conditions on one count|t|a=0.5940 b=0.5400 (1 row) q|exact|probabilities after a filter on a rank|t|1=0.0007 2=0.0120 3=0.0084 4=0.0160 5=0.0600 6=0.9000 (1 row) q|exact|probabilities a window over rows filtered on a rank|t|1=0.0007 2=0.0120 3=0.0084 4=0.0160 5=0.0600 6=0.9000 (1 row) q|exact|probabilities joined back|t|2-1=0.1000 3-1=0.1120 3-2=0.2100 4-1=0.0800 4-2=0.2000 4-3=0.2800 6-5=0.2041 (1 row) remove_provenance (1 row) id|g|x|y|p 1|a|10|1|0.0900 2|a|20||0.5000 3|a|20|3|0.5600 4|a|30|4|0.4000 5|b|5||0.0616 6|b|7|6|0.3402 (6 rows) remove_provenance (1 row) id|p 2|0.5000 4|0.4000 (2 rows) remove_provenance (1 row) id 1 6 (2 rows) WARNING: ProvSQL: row_number() / LIMIT / DISTINCT ON is tracked as rank() (WITH TIES), which it differs from when rows tie on the ORDER BY DETAIL: provsql-reason: row-number-as-rank; scope: deliberate remove_provenance (1 row) candidates 6 (1 row) remove_provenance (1 row) id|rn 1|4 (*) 2|2 (*) 3|3 (*) 4|1 (*) 5|6 (*) 6|5 (*) (6 rows) add_provenance (1 row) NOTICE: ProvSQL: gate_cmp expression was shortcut by probability-side pre-pass (1 Poisson-binomial): provenance circuit reduced from 55 to 3 gates NOTICE: ProvSQL: gate_cmp expression was shortcut by probability-side pre-pass (2 Poisson-binomial): provenance circuit reduced from 59 to 5 gates remove_provenance (1 row) id|p 7|0.000007894274 (1 row) remove_provenance (1 row) id|p 7|0.357290599567 (1 row) q|exact|probabilities WITH TIES|t|1=0.0920 2=0.1880 3=0.2632 4=0.0290 5=0.6000 6=0.9000 (1 row) q|exact|probabilities WITH TIES, first|t|1=0.0180 2=0.3000 3=0.4200 4=0.4000 5=0.0043 6=0.0648 (1 row) remove_provenance (1 row) q|c|s DISPLAY limit|2 (*)|12 (*) (1 row) q|c|s PLAIN limit|2|12 (1 row) remove_provenance (1 row) remove_provenance (1 row) candidates 6 (1 row) WARNING: ProvSQL: converting agg_token to text: provenance information is lost DETAIL: provsql-reason: stored-agg-token-conversion; scope: deliberate g|c|type a|5|provsql.agg_token b|3|provsql.agg_token (2 rows) add_provenance (1 row) WARNING: ProvSQL: row_number() over an aggregate result is tracked as rank(), which it differs from when groups tie on the ORDER BY DETAIL: provsql-reason: row-number-over-aggregate-as-rank; scope: deliberate WARNING: ProvSQL: ORDER BY on an aggregate result sorts on the value shown, not per world DETAIL: provsql-reason: order-by-aggregate-value; scope: deliberate remove_provenance (1 row) userid|p 1|0.750000 2|0.500000 3|0.500000 (3 rows) WARNING: ProvSQL: row_number() over an aggregate result is tracked as rank(), which it differs from when groups tie on the ORDER BY DETAIL: provsql-reason: row-number-over-aggregate-as-rank; scope: deliberate WARNING: ProvSQL: ORDER BY on an aggregate result sorts on the value shown, not per world DETAIL: provsql-reason: order-by-aggregate-value; scope: deliberate remove_provenance (1 row) userid|p 1|0.750000 2|0.500000 3|0.500000 (3 rows) add_provenance (1 row) WARNING: ProvSQL: ORDER BY on an aggregate result sorts on the value shown, not per world DETAIL: provsql-reason: order-by-aggregate-value; scope: deliberate remove_provenance (1 row) g|p 1|0.750000 2|0.125000 (2 rows) WARNING: ProvSQL: row_number() over an aggregate result is tracked as rank(), which it differs from when groups tie on the ORDER BY DETAIL: provsql-reason: row-number-over-aggregate-as-rank; scope: deliberate WARNING: ProvSQL: ORDER BY on an aggregate result sorts on the value shown, not per world DETAIL: provsql-reason: order-by-aggregate-value; scope: deliberate remove_provenance (1 row) g|p 1|0.750000 2|0.375000 (2 rows) add_provenance (1 row) remove_provenance (1 row) k|p 1|0.750000 2|0.375000 (2 rows) remove_provenance (1 row) remove_provenance (1 row) remove_provenance (1 row) add_provenance (1 row) remove_provenance (1 row) WARNING: ProvSQL: converting agg_token to text: provenance information is lost DETAIL: provsql-reason: stored-agg-token-conversion; scope: deliberate n|s 3|6 (1 row) remove_provenance (1 row) WARNING: ProvSQL: converting agg_token to text: provenance information is lost DETAIL: provsql-reason: stored-agg-token-conversion; scope: deliberate r 1.5000 (1 row) remove_provenance (1 row) WARNING: ProvSQL: converting agg_token to text: provenance information is lost DETAIL: provsql-reason: stored-agg-token-conversion; scope: deliberate n 3 (1 row) remove_provenance (1 row) add_provenance (1 row) remove_provenance (1 row) id|p 1|0.500000 2|0.500000 3|0.375000 4|0.250000 5|0.156250 (5 rows) remove_provenance (1 row) add_provenance (1 row) remove_provenance (1 row) v 20 (1 row) WARNING: ProvSQL: LIMIT / OFFSET without ORDER BY: provenance not tracked, although the statement tracks lr_k DETAIL: provsql-reason: limit-without-order-by; scope: deliberate HINT: Write LIMIT plain(k) to say so, or add an ORDER BY. remove_provenance (1 row) n 1 (1 row) remove_provenance (1 row)