POSTGRESQL查询计划

时间:2014-04-08 12:45:10

标签: performance postgresql sql-execution-plan

在我的应用程序中执行postgresql解释分析查询时,我得到这样的输出,

在这个查询所花费的实际时间是多少?这是一个缓慢的查询..如何找到这个?

请帮助我理解这一点。

HashAggregate  (cost=48313.09..48313.60 rows=41 width=14) (actual time=1082.477..1082.541 rows=100 loops=1)
   ->  Seq Scan on mt_summary_indexed_view  (cost=0.00..43291.00 rows=401767 width=14) (actual time=0.057..695.823 rows=400000 loops=1)
         Filter: ((viewed_at >= '2012-04-03 18:30:00'::timestamp without time zone) AND (viewed_at <= '2014-04-04 18:29:59'::timestamp without time zone) AND (responded_at >= '2012-04-03 18:30:00'::timestamp without time zone) AND (responded_at <= '2014-04-04 18:29:59'::timestamp without time zone) AND (user_id = 2))
         Rows Removed by Filter: 600000
 Total runtime: 1082.678 ms

0 个答案:

没有答案