explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Uwwh

Settings
# exclusive inclusive rows x rows loops node
1. 0.013 39,188.946 ↑ 1.0 50 1

Limit (cost=2,336.22..4,360.19 rows=50 width=258) (actual time=45.770..39,188.946 rows=50 loops=1)

2. 0.069 39,188.933 ↑ 8.5 50 1

Result (cost=2,336.22..19,580.45 rows=426 width=258) (actual time=45.767..39,188.933 rows=50 loops=1)

3. 5.895 45.664 ↑ 8.5 50 1

Sort (cost=2,336.22..2,337.28 rows=426 width=250) (actual time=45.643..45.664 rows=50 loops=1)

  • Sort Key: v.create_dt DESC, v.version_date DESC
  • Sort Method: top-N heapsort Memory: 38kB
4. 17.432 39.769 ↓ 20.5 8,747 1

Hash Left Join (cost=25.87..2,322.06 rows=426 width=250) (actual time=0.317..39.769 rows=8,747 loops=1)

  • Hash Cond: (v.created_user_id = u.id)
5. 1.734 22.134 ↓ 20.5 8,747 1

Nested Loop (cost=2.35..2,283.11 rows=426 width=556) (actual time=0.089..22.134 rows=8,747 loops=1)

6. 0.014 0.014 ↑ 1.0 1 1

Seq Scan on ca_versop vo (cost=0.00..1.07 rows=1 width=45) (actual time=0.013..0.014 rows=1 loops=1)

  • Filter: (id = 3)
  • Rows Removed by Filter: 5
7. 4.485 20.386 ↓ 20.5 8,747 1

Hash Join (cost=2.35..2,277.77 rows=426 width=511) (actual time=0.071..20.386 rows=8,747 loops=1)

  • Hash Cond: (v.listing_id = lis.id)
8. 15.871 15.871 ↑ 1.0 8,747 1

Seq Scan on ca_version v (cost=0.00..2,237.59 rows=8,952 width=393) (actual time=0.015..15.871 rows=8,747 loops=1)

  • Filter: (operation_id = 3)
  • Rows Removed by Filter: 26250
9. 0.007 0.030 ↓ 3.0 3 1

Hash (cost=2.34..2.34 rows=1 width=134) (actual time=0.030..0.030 rows=3 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
10. 0.023 0.023 ↓ 3.0 3 1

Seq Scan on ca_listing lis (cost=0.00..2.34 rows=1 width=134) (actual time=0.013..0.023 rows=3 loops=1)

  • Filter: (((listing_type)::text = 'Реестр'::text) AND ((listing_code)::text = ANY ('{F002,F003,F004}'::text[])))
  • Rows Removed by Filter: 18
11. 0.064 0.203 ↑ 1.0 327 1

Hash (cost=19.34..19.34 rows=334 width=11) (actual time=0.203..0.203 rows=327 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 23kB
12. 0.139 0.139 ↑ 1.0 327 1

Seq Scan on "user" u (cost=0.00..19.34 rows=334 width=11) (actual time=0.003..0.139 rows=327 loops=1)

13.          

SubPlan (forResult)

14. 32.032 39,143.200 ↑ 1.0 1 50

Aggregate (cost=40.43..40.44 rows=1 width=8) (actual time=782.863..782.864 rows=1 loops=50)

15.          

Initplan (forAggregate)

16. 0.001 0.018 ↑ 1.0 1 1

Limit (cost=0.00..1.05 rows=1 width=4) (actual time=0.018..0.018 rows=1 loops=1)

17. 0.017 0.017 ↑ 1.0 1 1

Seq Scan on ca_msgtyp (cost=0.00..1.05 rows=1 width=4) (actual time=0.017..0.017 rows=1 loops=1)

  • Filter: ((code)::text = '2'::text)
  • Rows Removed by Filter: 1
18. 39,111.150 39,111.150 ↓ 10.1 893 50

Index Scan using idx_ca_lderror_version_id on ca_lderror e (cost=0.43..39.16 rows=88 width=1,403) (actual time=0.015..782.223 rows=893 loops=50)

  • Index Cond: (version_id = v.id)
  • Filter: (message_type = $0)
  • Rows Removed by Filter: 1