regression in PG 15.1

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Table is partitioned on a column tbl_id, with an increasing "transaction id".

  select * from tbl where txid > something and tbl_id = someval;

^^^ works as normal, searches the single partition, taking 0.044ms

  select * from tbl where txid > something and tbl_id = (select id from reftbl where name = 'someval');

^^^ fails to exclude partitions, kicks off parallel scans on all 142, takes 23,170ms

Queries in question are NOT auto-generated from some ORM, so there is an obvious easy workaround. Before trying that, and before digging into full table defs here, does anyone have an idea how to nudge the planner toward excluding the partitions.

--
Scott Ribe
scott_ribe@xxxxxxxxxxxxxxxx
https://www.linkedin.com/in/scottribe/









[Index of Archives]     [Postgresql Home]     [Postgresql General]     [Postgresql Performance]     [Postgresql PHP]     [Postgresql Jobs]     [PHP Users]     [PHP Databases]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Databases]     [Yosemite Forum]

  Powered by Linux