Why is using a numbers table so much faster than using a recursive CTE to generate them on the fly? On my machine, given a table numbers with a single column n (primary key) containing the numbers from 1 to 100000, the following query: select n from numbers; Takes around 400 ms to finish. […]