Planner Conceptual Errors
NOT IN is hard to optimize
CAKNQRbz8-XYcSmoK8u3S0BvVVk3OdXve7NG20eNwB5p5xms8MQ@mail.gmail.com16161.1324414006@sss.pgh.pa.us12106.1325009566@sss.pgh.pa.us
cross-data-type comparisons are not always indexable
DF644560-967D-4B1B-BEE0-49020DC1359F@inf.unibz.itCAFLkBaWRKp7+yVdk3dCecztxEztc+YFS4ks=x3KiSWSfyDZvKw@mail.gmail.comCABWW-d1kp9AVovSE-6yVCbpNLO0Rt_U2mW6ZCnzYUSCCtP3mpA@mail.gmail.com
target lists are computed too early or unnecessarily
CAK-MWwTasteHbxcSN69jKfBbXJmxxUrtH7xL-jaBjEj3_2xfaQ@mail.gmail.com[before ORDER BY/LIMIT]20130414123414.00000718@unknown[before ORDER BY/LIMIT]51304B61.5030103@gmail.com[appendrel]
inlining can lose if we inline the same thing multiple times
E1RfAwz-0006Us-7B@wrigleys.postgresql.org0238E40E527049828C48675488422F6D@CAPRICA16161.1324414006@sss.pgh.pa.us[a query with many nodes can use too many copies of work_mem]
The query planner does not deduce implied inequalities.
See 676.1308068945@sss.pgh.pa.us
It won’t propagate IN or other criteria either: e.g. a IN (…) and a = b does not imply b IN (…)
Can’t rewrite SELECT max(blah) WHERE dork IN (…) as max of index scans
Query planner isn’t smart about rearranging aggregates and joins
CA+CSw_vPcZoYhgpcHdLHqYbuRiH=YCHuC0SDfJc8DcZJopEXow@mail.gmail.comalpine.LNX.2.01.1202261358070.31287@stax.localdomain