explain.depesz.com

PostgreSQL's explain analyze made readable

Result: IuWn

Settings
# exclusive inclusive rows x rows loops node
1. 0.000 1,883.726 ↑ 1.0 1 1

Finalize Aggregate (cost=416,445.46..416,445.47 rows=1 width=8) (actual time=1,883.725..1,883.726 rows=1 loops=1)

2. 42.584 1,896.563 ↓ 1.5 3 1

Gather (cost=416,445.25..416,445.46 rows=2 width=8) (actual time=1,883.710..1,896.563 rows=3 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
3. 4.270 1,853.979 ↑ 1.0 1 3

Partial Aggregate (cost=415,445.25..415,445.26 rows=1 width=8) (actual time=1,853.979..1,853.979 rows=1 loops=3)

4. 176.102 1,849.709 ↑ 2.4 24,654 3

Nested Loop (cost=149,950.08..415,296.46 rows=59,513 width=0) (actual time=858.079..1,849.709 rows=24,654 loops=3)

5. 0.007 0.007 ↑ 1.0 1 73,961

Index Only Scan using index_product_listings_on_listing_type_and_listing_id on product_listings (cost=0.43..0.59 rows=1 width=8) (actual time=0.006..0.007 rows=1 loops=73,961)

6. 225.882 1,673.600 ↑ 2.6 24,654 3

Hash Join (cost=149,949.65..376,480.47 rows=64,746 width=8) (actual time=857.993..1,673.600 rows=24,654 loops=3)

  • Index Cond: ((listing_type = 'Listings::Shopgoodwill'::text) AND (listing_id = listings_shopgoodwill.id))
  • Heap Fetches: 24674
  • Hash Cond: (listings_shopgoodwill.product_id = products.id)
7. 590.900 590.900 ↑ 1.3 307,093 3

Parallel Seq Scan on listings_shopgoodwill (cost=0.00..221,247.98 rows=385,085 width=16) (actual time=0.056..590.900 rows=307,093 loops=3)

8. 57.798 856.818 ↓ 1.0 131,253 3

Hash (cost=147,808.70..147,808.70 rows=130,476 width=8) (actual time=856.818..856.818 rows=131,253 loops=3)

  • Rows Removed by Filter: 50835
  • Filter: ((state)::text = ANY ('{DELISTED,EXPIRED,LISTING,PENDING_PURGING,PURGING,PURGED,PENDING_RELISTING,RELISTING,PENDING,UNPAID,SOLD}'::text[]))
  • Buckets: 131072 Batches: 2 Memory Usage: 3602kB
9. 758.588 799.020 ↓ 1.0 131,253 3

Bitmap Heap Scan on products (cost=2,919.61..147,808.70 rows=130,476 width=8) (actual time=52.046..799.020 rows=131,253 loops=3)

  • Rows Removed by Index Recheck: 116902
  • Recheck Cond: (organization_id = 3)
  • Heap Blocks: exact=37868 lossy=33237
10. 40.432 40.432 ↓ 1.0 131,253 3

Bitmap Index Scan on index_products_on_organization_id (cost=0.00..2,886.99 rows=130,476 width=0) (actual time=40.432..40.432 rows=131,253 loops=3)

  • Index Cond: (organization_id = 3)
Planning time : 0.912 ms
Execution time : 1,896.640 ms