explain.depesz.com

PostgreSQL's explain analyze made readable

Result: WQPh

Settings
# exclusive inclusive rows x rows loops node
1. 0.001 0.061 ↓ 0.0 0 1

Limit (cost=6,404.00..6,404.01 rows=1 width=502) (actual time=0.061..0.061 rows=0 loops=1)

2.          

CTE tags

3. 0.000 0.000 ↓ 0.0 0

GroupAggregate (cost=6,322.25..6,356.25 rows=1,360 width=48) (never executed)

  • Group Key: revisions_events_1.revision_id
4. 0.000 0.000 ↓ 0.0 0

Sort (cost=6,322.25..6,325.65 rows=1,360 width=80) (never executed)

  • Sort Key: revisions_events_1.revision_id
5. 0.000 0.000 ↓ 0.0 0

Hash Join (cost=27.43..6,251.47 rows=1,360 width=80) (never executed)

  • Hash Cond: (ledger_resource_tags.tag_id = ledger_tags.tag_id)
6. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=0.56..6,221.00 rows=1,360 width=32) (never executed)

7. 0.000 0.000 ↓ 0.0 0

Seq Scan on ledger_resource_tags (cost=0.00..23.60 rows=1,360 width=32) (never executed)

8. 0.000 0.000 ↓ 0.0 0

Index Only Scan using revisions_events_pkey on revisions_events revisions_events_1 (cost=0.56..4.56 rows=1 width=16) (never executed)

  • Index Cond: (revision_id = ledger_resource_tags.revision_id)
  • Heap Fetches: 0
9. 0.000 0.000 ↓ 0.0 0

Hash (cost=17.50..17.50 rows=750 width=80) (never executed)

10. 0.000 0.000 ↓ 0.0 0

Seq Scan on ledger_tags (cost=0.00..17.50 rows=750 width=80) (never executed)

11. 0.000 0.060 ↓ 0.0 0 1

Unique (cost=47.75..47.76 rows=1 width=502) (actual time=0.060..0.060 rows=0 loops=1)

12. 0.027 0.060 ↓ 0.0 0 1

Sort (cost=47.75..47.75 rows=1 width=502) (actual time=0.060..0.060 rows=0 loops=1)

  • Sort Key: revisions_events.resource_id, revisions_events.meta_updated_at DESC
  • Sort Method: quicksort Memory: 25kB
13. 0.001 0.033 ↓ 0.0 0 1

Nested Loop (cost=8.95..47.74 rows=1 width=502) (actual time=0.033..0.033 rows=0 loops=1)

14. 0.032 0.032 ↓ 0.0 0 1

Hash Right Join (cost=8.39..39.16 rows=1 width=478) (actual time=0.032..0.032 rows=0 loops=1)

  • Hash Cond: (tags.revision_id = revisions_events.revision_id)