Re: Slow query with a lot of data
От | Matthew Wakeling |
---|---|
Тема | Re: Slow query with a lot of data |
Дата | |
Msg-id | alpine.DEB.1.10.0808191311540.4454@aragorn.flymine.org обсуждение исходный текст |
Ответ на | Re: Slow query with a lot of data (Moritz Onken <onken@houseofdesign.de>) |
Ответы |
Re: Slow query with a lot of data
|
Список | pgsql-performance |
On Tue, 19 Aug 2008, Moritz Onken wrote: > tablename | attname | n_distinct | correlation > result | domain | 1642 | 1 Well, the important thing is the correlation, which is 1, indicating that Postgres knows that the table is clustered. So I have no idea why it is sorting the entire table. What happens when you run EXPLAIN SELECT * FROM result ORDER BY domain? >> Sounds like an awfully long time to me. Also, I think restricting it to 280 >> users is probably not making it any faster. > > If I hadn't restricted it to 280 users it would have run ~350days... What makes you say that? Perhaps you could post EXPLAINs of both of the queries. Matthew -- What goes up must come down. Ask any system administrator.
В списке pgsql-performance по дате отправления: