From: | Michael Lewis <mlewis(at)entrata(dot)com> |
---|---|
To: | "support(at)mekong(dot)be" <support(at)mekong(dot)be> |
Cc: | Justin Pryzby <pryzby(at)telsasoft(dot)com>, postgres performance list <pgsql-performance(at)postgresql(dot)org> |
Subject: | Re: Query slow for new participants |
Date: | 2019-02-26 19:08:51 |
Message-ID: | CAHOFxGrhyXmGe_bgY_oO5du_Qt7S0aDDAvxR2znYeawNAPEk-g@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-performance |
> Indexes:
> "pk_pricedb" PRIMARY KEY, btree (companyid, articleid)
> "EnabledIndex" btree (enabled)
> "ix_companyarticledb_article" btree (articleid)
> "ix_companyarticledb_company" btree (companyid)
>
I'd say drop ix_companyarticledb_company since pk_pricedb can be used
instead even if other queries are only on companyid field, and it will be
faster for this case certainly since it targets the row you want directly
from the index without the *"Rows Removed by Filter: 2674361"*
I doubt the default_statistics_target = 100 default is doing you any
favors. You may want to try increasing that to 500 or 1000 if you can
afford a small increase in planning cost and more storage for the bigger
sampling of stats.
From | Date | Subject | |
---|---|---|---|
Next Message | support@mekong.be | 2019-02-26 21:39:05 | Re: Query slow for new participants |
Previous Message | Jeff Janes | 2019-02-26 13:52:29 | Re: Aggregate and many LEFT JOIN |