explain.depesz.com

PostgreSQL's explain analyze made readable

Result: StjS

Settings
# exclusive inclusive rows x rows loops node
1. 0.154 1,008.358 ↑ 1.0 1 1

Aggregate (cost=125,407.68..125,407.69 rows=1 width=0) (actual time=1,008.358..1,008.358 rows=1 loops=1)

2. 0.299 1,008.204 ↑ 662.4 749 1

Nested Loop (cost=0.85..124,167.29 rows=496,158 width=0) (actual time=933.452..1,008.204 rows=749 loops=1)

3. 0.017 0.017 ↑ 1.0 1 1

Seq Scan on stores s (cost=0.00..1.15 rows=1 width=8) (actual time=0.014..0.017 rows=1 loops=1)

  • Filter: (id = 1)
  • Rows Removed by Filter: 11
4. 286.323 1,007.888 ↑ 662.4 749 1

Merge Anti Join (cost=0.85..119,204.56 rows=496,158 width=8) (actual time=933.434..1,007.888 rows=749 loops=1)

  • Merge Cond: (c.id = t.cellphone_id)
5. 453.975 453.975 ↑ 1.0 492,445 1

Index Scan using cellphones_pkey on cellphones c (cost=0.42..70,476.96 rows=500,344 width=16) (actual time=0.009..453.975 rows=492,445 loops=1)

  • Filter: ((deleted_at IS NULL) AND (store_id = 1))
  • Rows Removed by Filter: 140145
6. 267.590 267.590 ↑ 6.4 544,993 1

Index Only Scan using transactions_cellphone_id_index on transactions t (cost=0.43..278,140.48 rows=3,496,757 width=8) (actual time=0.035..267.590 rows=544,993 loops=1)

  • Heap Fetches: 133548
Planning time : 0.392 ms
Execution time : 1,008.416 ms