Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/performance/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Performance POSTGRESQL查询计划_Performance_Postgresql_Sql Execution Plan - Fatal编程技术网

Performance POSTGRESQL查询计划

Performance POSTGRESQL查询计划,performance,postgresql,sql-execution-plan,Performance,Postgresql,Sql Execution Plan,在应用程序中为查询执行postgresql explain Analysis时,我得到如下输出: 在这种情况下,查询实际花费的时间是多少?这是一个缓慢的查询..如何找到它 请帮助我理解这一点 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

在应用程序中为查询执行postgresql explain Analysis时,我得到如下输出:

在这种情况下,查询实际花费的时间是多少?这是一个缓慢的查询..如何找到它

请帮助我理解这一点

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
HashAggregate(成本=48313.09..48313.60行=41宽度=14)(实际时间=1082.477..1082.541行=100个循环=1)
->MTU摘要索引视图上的顺序扫描(成本=0.00..43291.00行=401767宽度=14)(实际时间=0.057..695.823行=400000循环=1)

过滤器:((查看时间>='2012-04-03 18:30:00'::无时区的时间戳)和(查看时间='2012-04-03 18:30:00'::无时区的时间戳)和(在总运行时响应时间:1082.678毫秒(在最后)嗯,这花了1秒。这可能非常慢,也可能非常快,这取决于查询的性质和您的要求。您好,下面是查询,解释分析选择计数(“”)作为视图计数,大小写是什么时候响应的=“是”然后计数(“”)在“2012-04-03 18:30:00”和“2014-04-04 18:29:59”之间查看并在“2012-04-03 18:30:00”和“2014-04-04 18:29:59”之间回复且用户id=2组问题id的mt_摘要_索引_视图中以res_count结束,是否已回复