explain.depesz.com

PostgreSQL's explain analyze made readable

Result: KeYy

Settings
# exclusive inclusive rows x rows loops node
1. 66.317 65,366.619 ↓ 5.0 5 1

GroupAggregate (cost=5.88..39.29 rows=1 width=108) (actual time=61,739.220..65,366.619 rows=5 loops=1)

  • Group Key: ((di.dat_stad_ispoln)::date)
2. 662.852 60,539.707 ↓ 37,485.0 37,485 1

Sort (cost=5.88..5.88 rows=1 width=26) (actual time=60,533.475..60,539.707 rows=37,485 loops=1)

  • Sort Key: ((di.dat_stad_ispoln)::date)
  • Sort Method: quicksort Memory: 4,465kB
3. 125.659 59,876.855 ↓ 37,485.0 37,485 1

Nested Loop Left Join (cost=1.01..5.87 rows=1 width=26) (actual time=160.333..59,876.855 rows=37,485 loops=1)

4. 5,173.036 5,173.036 ↓ 37,485.0 37,485 1

Index Scan using decis_ispoln_kod_dat on decis_ispoln di (cost=0.58..3.00 rows=1 width=14) (actual time=153.623..5,173.036 rows=37,485 loops=1)

  • Index Cond: ((stad_ispoln_kod = '5'::numeric) AND (dat_stad_ispoln >= (('now'::cstring)::date - '7 days'::interval)) AND (dat_stad_ispoln <= (('now'::cstring)::date - '1 day'::interval)))
  • Filter: ((organ_ispoln_kod)::text = '597'::text)
  • Rows Removed by Filter: 6,920
5. 54,578.160 54,578.160 ↑ 1.0 1 37,485

Index Scan using docs_executive_delo_id on docs_executive e (cost=0.43..2.85 rows=1 width=20) (actual time=1.250..1.456 rows=1 loops=37,485)

  • Index Cond: (delo_id = di.delo_id)
6.          

SubPlan (for GroupAggregate)

7. 0.000 4,198.320 ↓ 0.0 0 37,485

Limit (cost=8.32..8.33 rows=1 width=8) (actual time=0.112..0.112 rows=0 loops=37,485)

8. 37.485 4,198.320 ↓ 0.0 0 37,485

Sort (cost=8.32..8.33 rows=2 width=8) (actual time=0.112..0.112 rows=0 loops=37,485)

  • Sort Key: docs_executive_response_log_3.create_time DESC
  • Sort Method: quicksort Memory: 25kB
9. 4,160.835 4,160.835 ↑ 2.0 1 37,485

Index Scan using docs_executive_response_log_docs_id on docs_executive_response_log docs_executive_response_log_3 (cost=0.43..8.31 rows=2 width=8) (actual time=0.048..0.111 rows=1 loops=37,485)

  • Index Cond: (docs_id = e.docs_id)
  • Filter: ((create_time >= e.dat_sost) AND (process_status = '5'::numeric))
  • Rows Removed by Filter: 1
10. 37.485 262.395 ↓ 0.0 0 37,485

Limit (cost=8.32..8.33 rows=1 width=8) (actual time=0.007..0.007 rows=0 loops=37,485)

11. 37.485 224.910 ↓ 0.0 0 37,485

Sort (cost=8.32..8.33 rows=2 width=8) (actual time=0.006..0.006 rows=0 loops=37,485)

  • Sort Key: docs_executive_response_log_2.create_time DESC
  • Sort Method: quicksort Memory: 25kB
12. 187.425 187.425 ↑ 2.0 1 37,485

Index Scan using docs_executive_response_log_docs_id on docs_executive_response_log docs_executive_response_log_2 (cost=0.43..8.31 rows=2 width=8) (actual time=0.004..0.005 rows=1 loops=37,485)

  • Index Cond: (docs_id = e.docs_id)
  • Filter: ((create_time >= e.dat_sost) AND (process_status = ANY ('{2,5}'::numeric[])))
  • Rows Removed by Filter: 1
13. 0.000 149.940 ↓ 0.0 0 37,485

Limit (cost=8.32..8.33 rows=1 width=8) (actual time=0.004..0.004 rows=0 loops=37,485)

14. 37.485 149.940 ↓ 0.0 0 37,485

Sort (cost=8.32..8.33 rows=2 width=8) (actual time=0.004..0.004 rows=0 loops=37,485)

  • Sort Key: docs_executive_response_log_1.create_time DESC
  • Sort Method: quicksort Memory: 25kB
15. 112.455 112.455 ↓ 0.0 0 37,485

Index Scan using docs_executive_response_log_docs_id on docs_executive_response_log docs_executive_response_log_1 (cost=0.43..8.31 rows=2 width=8) (actual time=0.003..0.003 rows=0 loops=37,485)

  • Index Cond: (docs_id = e.docs_id)
  • Filter: ((create_time < e.dat_sost) AND (process_status = ANY ('{2,5}'::numeric[])))
  • Rows Removed by Filter: 2
16. 0.000 149.940 ↓ 0.0 0 37,485

Limit (cost=8.32..8.33 rows=1 width=8) (actual time=0.004..0.004 rows=0 loops=37,485)

17. 37.485 149.940 ↓ 0.0 0 37,485

Sort (cost=8.32..8.33 rows=2 width=8) (actual time=0.004..0.004 rows=0 loops=37,485)

  • Sort Key: docs_executive_response_log.create_time DESC
  • Sort Method: quicksort Memory: 25kB
18. 112.455 112.455 ↓ 0.0 0 37,485

Index Scan using docs_executive_response_log_docs_id on docs_executive_response_log (cost=0.43..8.31 rows=2 width=8) (actual time=0.003..0.003 rows=0 loops=37,485)

  • Index Cond: (docs_id = e.docs_id)
  • Filter: ((create_time < e.dat_sost) AND (process_status = ANY ('{2,5}'::numeric[])))
  • Rows Removed by Filter: 2
Planning time : 0.691 ms
Execution time : 65,367.133 ms