Performance : Optimize query
От | Areski |
---|---|
Тема | Performance : Optimize query |
Дата | |
Msg-id | OE54MJofg60gkepiFvU00001ed6@hotmail.com обсуждение исходный текст |
Ответ на | SELECT INTO ("Roberto de Amorim" <roberto@smartbit.inf.br>) |
Ответы |
Re: Performance : Optimize query
|
Список | pgsql-general |
Hi Everybody, I have this following query : select count(*) from "Data" where "IDOrigin"='29'; It's take more less 2 minutes to run... It's really slow... Some one maybe knows about how to optimize "select count" Below, there are the expalin analyse of the query. EXPLAIN ANALYZE select count(*) from "Data" where "IDOrigin"='29'; NOTICE: QUERY PLAN: Aggregate (cost=108945.77..108945.77 rows=1 width=0) (actual time=108845.29..108845.30 rows=1 loops=1) -> Seq Scan on Data (cost=0.00..107152.11 rows=717462 width=0) (actual time=18233.46..106927.60 rows=1457826 loops=1) Total runtime: 108845.50 msec. I did already a lot of optimization such as modify shared_buffers and sort_mem... But always too slow... Thanks, Areski
В списке pgsql-general по дате отправления: