Re: Why should such a simple query over indexed columns be so slow?
От | Josh Berkus |
---|---|
Тема | Re: Why should such a simple query over indexed columns be so slow? |
Дата | |
Msg-id | 4F270AB1.6070100@agliodbs.com обсуждение исходный текст |
Ответ на | Re: Why should such a simple query over indexed columns be so slow? (Claudio Freire <klaussfreire@gmail.com>) |
Ответы |
Re: Why should such a simple query over indexed columns be
so slow?
|
Список | pgsql-performance |
On 1/30/12 12:59 PM, Claudio Freire wrote: > On Mon, Jan 30, 2012 at 5:55 PM, Alessandro Gagliardi > <alessandro@path.com> wrote: >> Hm. Well, it looks like setting enable_seqscan=false is session specific, so >> it seems like I can use it with this query alone; but it sounds like even if >> that works, it's a bad practice. (Is that true?) > > Yep The issue with that is that the enable_seqscan setting is not limited to that one table in that query, and won't change over time. So by all means use it as a hotfix right now, but it's not a long-term solution to your problem. > >> My effective_cache_size is 1530000kB That seems appropriate for the Ronin; I'll test one out and see what random_page_cost is set to as well, possibly Heroku needs to adjust the basic template for the Ronin. For Heroku, we want to favor index scans a bit more than you would on regular hardware because the underlying storage is Amazon, which has good seeks but crap throughput. You can do "SHOW random_page_cost" yourself right now, too. -- Josh Berkus PostgreSQL Experts Inc. http://pgexperts.com
В списке pgsql-performance по дате отправления: