Statistics on a boolean function
lab.small(y) is true for 1 percent of 10000 rows. Without statistics the planner guesses 1/3 of the table.
task
Create expression statistics on lab.small(y), ANALYZE, and bring the estimate below 1000 rows.
Run a query to see rows here.
Run EXPLAIN on the statement under the cursor: Plan tab, button Explain.
No tables yet.
lab.small(y) is true for 1 percent of 10000 rows. Without statistics the planner guesses 1/3 of the table.
Create expression statistics on lab.small(y), ANALYZE, and bring the estimate below 1000 rows.