limit to thatslow: find-resources-with { } → limit 50
fast: find-resources-with { doc_type, anchor } → limit 50returns selects what comes back. It does not select what runs. A planpg_stat_statements.shared_blks_hit vs shared_blks_read. A statement that is nearly all hits is spendingtrack_io_timing before trusting the blk_read_time columns; when it is off they read zero,temp_blks_written. Non-zero means the plan spilled. This is the most common source of awork_mem for the read path is usuallymin_exec_time and stddev_exec_time next to the mean. A high floor and a long tail arePARALLEL SAFE. A singlework_mem — the spill cliff above. Worth setting for the read path specifically rather thanALTER FUNCTION … SET givesstatement_timeout — the backstop. See the concept page for how to choose it; the short