Re: Bad query plan when you add many OR conditions
Tomas Vondra <[email protected]> Mon, 13 Jan 2020 23:14:11 +0100
| Newsgroups | gmane.comp.db.postgresql.performance |
|---|---|
| Message-ID | <20200113221411.sm5dm6fol3uwbuyp@development> |
On Fri, Jan 10, 2020 at 02:30:27PM +0100, Marco Colli wrote: >@Justin Pryzby I have tried this as you suggested: > >CREATE STATISTICS statistics_on_subscriptions_project_id_and_tags ON >project_id, tags FROM subscriptions; >VACUUM ANALYZE subscriptions; > >Unfortunately nothing changes and Postgresql continues to use the wrong >plan (maybe stats don't work well on array fields like tags??). > We support this type of clause for extended statistics (yet). regards -- Tomas Vondra http://www.2ndQuadrant.com PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services