explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Q9WO

Settings
# exclusive inclusive rows x rows loops node
1. 23.764 137.344 ↑ 1.0 10,000 1

Hash Semi Join (cost=10,619.17..13,254.30 rows=10,000 width=49) (actual time=100.130..137.344 rows=10,000 loops=1)

  • Hash Cond: (employees.id = "ANY_subquery".id)
2. 13.622 13.622 ↑ 1.0 110,011 1

Seq Scan on employees (cost=0.00..2,235.11 rows=110,011 width=49) (actual time=0.026..13.622 rows=110,011 loops=1)

3. 3.320 99.958 ↑ 1.0 10,000 1

Hash (cost=10,494.17..10,494.17 rows=10,000 width=16) (actual time=99.958..99.958 rows=10,000 loops=1)

  • Buckets: 16384 Batches: 1 Memory Usage: 597kB
4. 1.921 96.638 ↑ 1.0 10,000 1

Subquery Scan on ANY_subquery (cost=10,369.17..10,494.17 rows=10,000 width=16) (actual time=92.206..96.638 rows=10,000 loops=1)

5. 0.853 94.717 ↑ 1.0 10,000 1

Limit (cost=10,369.17..10,394.17 rows=10,000 width=24) (actual time=92.204..94.717 rows=10,000 loops=1)

6. 67.712 93.864 ↑ 11.0 10,000 1

Sort (cost=10,369.17..10,644.19 rows=110,011 width=24) (actual time=92.203..93.864 rows=10,000 loops=1)

  • Sort Key: (random())
  • Sort Method: top-N heapsort Memory: 2088kB
7. 26.152 26.152 ↑ 1.0 110,011 1

Seq Scan on employees employees_1 (cost=0.00..2,510.14 rows=110,011 width=24) (actual time=0.026..26.152 rows=110,011 loops=1)