explain.depesz.com

PostgreSQL's explain analyze made readable

Result: EoOV

Settings
# exclusive inclusive rows x rows loops node
1. 0.000 1.950 ↑ 1.0 10 1

Limit (cost=137.38..137.40 rows=10 width=12) (actual time=1.942..1.950 rows=10 loops=1)

2. 0.258 1.950 ↑ 98.5 10 1

Sort (cost=137.38..139.84 rows=985 width=12) (actual time=1.942..1.950 rows=10 loops=1)

  • Sort Key: tr.created_at DESC
  • Sort Method: top-N heapsort Memory: 25kB
3. 0.304 1.692 ↓ 1.0 989 1

Hash Left Join (cost=28.00..116.09 rows=985 width=12) (actual time=0.171..1.692 rows=989 loops=1)

  • Hash Cond: ((tr.user2_id)::text = ((svc.id)::character varying)::text)
4. 0.353 1.367 ↓ 1.0 989 1

Hash Left Join (cost=15.75..87.83 rows=985 width=12) (actual time=0.139..1.367 rows=989 loops=1)

  • Hash Cond: ((tr.user2_id)::text = ((api.id)::character varying)::text)
5. 0.258 0.973 ↓ 1.0 989 1

Hash Left Join (cost=4.62..60.70 rows=985 width=12) (actual time=0.090..0.973 rows=989 loops=1)

  • Hash Cond: ((tr.order_id)::text = ((inv.id)::character varying)::text)
6. 0.432 0.673 ↓ 1.0 989 1

Hash Left Join (cost=1.36..42.80 rows=985 width=13) (actual time=0.041..0.673 rows=989 loops=1)

  • Hash Cond: ((tr.user2_id)::text = ((u2.id)::character varying)::text)
7. 0.218 0.218 ↓ 1.0 989 1

Seq Scan on transactions tr (cost=0.00..31.85 rows=985 width=21) (actual time=0.010..0.218 rows=989 loops=1)

8. 0.015 0.023 ↑ 1.0 16 1

Hash (cost=1.16..1.16 rows=16 width=4) (actual time=0.023..0.023 rows=16 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
9. 0.008 0.008 ↑ 1.0 16 1

Seq Scan on users u2 (cost=0.00..1.16 rows=16 width=4) (actual time=0.005..0.008 rows=16 loops=1)

10. 0.026 0.042 ↓ 1.1 62 1

Hash (cost=2.56..2.56 rows=56 width=8) (actual time=0.042..0.042 rows=62 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 11kB
11. 0.016 0.016 ↓ 1.1 62 1

Seq Scan on invoices inv (cost=0.00..2.56 rows=56 width=8) (actual time=0.005..0.016 rows=62 loops=1)

12. 0.008 0.041 ↑ 16.7 3 1

Hash (cost=10.50..10.50 rows=50 width=4) (actual time=0.041..0.041 rows=3 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
13. 0.033 0.033 ↑ 16.7 3 1

Seq Scan on api_users api (cost=0.00..10.50 rows=50 width=4) (actual time=0.033..0.033 rows=3 loops=1)

14. 0.013 0.021 ↑ 3.8 26 1

Hash (cost=11.00..11.00 rows=100 width=4) (actual time=0.021..0.021 rows=26 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
15. 0.008 0.008 ↑ 3.8 26 1

Seq Scan on services svc (cost=0.00..11.00 rows=100 width=4) (actual time=0.005..0.008 rows=26 loops=1)