explain.depesz.com

PostgreSQL's explain analyze made readable

Result: d977

Settings
# exclusive inclusive rows x rows loops node
1. 57.254 70,602.382 ↓ 5.0 5 1

GroupAggregate (cost=5.88..39.29 rows=1 width=108) (actual time=66,486.587..70,602.382 rows=5 loops=1)

  • Group Key: ((di.dat_stad_ispoln)::date)
2. 62.544 65,340.412 ↓ 37,444.0 37,444 1

Sort (cost=5.88..5.88 rows=1 width=26) (actual time=65,334.595..65,340.412 rows=37,444 loops=1)

  • Sort Key: ((di.dat_stad_ispoln)::date)
  • Sort Method: quicksort Memory: 4,462kB
3. 118.685 65,277.868 ↓ 37,444.0 37,444 1

Nested Loop (cost=1.01..5.87 rows=1 width=26) (actual time=1,682.064..65,277.868 rows=37,444 loops=1)

4. 6,021.971 6,021.971 ↓ 44,364.0 44,364 1

Index Scan using decis_ispoln_kod_dat on decis_ispoln di (cost=0.58..3.00 rows=1 width=14) (actual time=0.608..6,021.971 rows=44,364 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)))
5. 59,137.212 59,137.212 ↑ 1.0 1 44,364

Index Scan using docs_executive_delo_id on docs_executive e (cost=0.43..2.85 rows=1 width=20) (actual time=1.330..1.333 rows=1 loops=44,364)

  • Index Cond: (delo_id = di.delo_id)
  • Filter: ((ogai_sost_kod)::text = '45597'::text)
  • Rows Removed by Filter: 0
6.          

SubPlan (for GroupAggregate)

7. 37.444 4,717.944 ↓ 0.0 0 37,444

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

8. 37.444 4,680.500 ↓ 0.0 0 37,444

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

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

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.038..0.124 rows=1 loops=37,444)

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

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

11. 37.444 187.220 ↓ 0.0 0 37,444

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

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

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.003..0.004 rows=1 loops=37,444)

  • 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.776 ↓ 0.0 0 37,444

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

14. 37.444 149.776 ↓ 0.0 0 37,444

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

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

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,444)

  • 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.776 ↓ 0.0 0 37,444

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

17. 37.444 149.776 ↓ 0.0 0 37,444

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

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

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,444)

  • 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.794 ms
Execution time : 70,603.107 ms