explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 7OJb

Settings
# exclusive inclusive rows x rows loops node
1. 0.008 441.954 ↑ 1.0 10 1

Limit (cost=71,565.06..71,565.08 rows=10 width=59) (actual time=441.948..441.954 rows=10 loops=1)

2. 0.651 441.946 ↑ 712.8 10 1

Sort (cost=71,565.06..71,582.88 rows=7,128 width=59) (actual time=441.945..441.946 rows=10 loops=1)

  • Sort Key: (bool_or(("markedAsNoveltyAt" IS NOT NULL))) DESC, (max("noveltyWeight")) DESC
  • Sort Method: top-N heapsort Memory: 27kB
3. 1.693 441.295 ↑ 4.9 1,467 1

GroupAggregate (cost=71,246.03..71,411.03 rows=7,128 width=59) (actual time=439.231..441.295 rows=1,467 loops=1)

  • Group Key: __group
4. 36.981 439.602 ↑ 2.4 3,063 1

Sort (cost=71,246.03..71,264.78 rows=7,497 width=58) (actual time=439.216..439.602 rows=3,063 loops=1)

  • Sort Key: __group
  • Sort Method: quicksort Memory: 452kB
5. 357.523 402.621 ↑ 2.4 3,063 1

Bitmap Heap Scan on products (cost=7,523.75..70,763.52 rows=7,497 width=58) (actual time=54.388..402.621 rows=3,063 loops=1)

  • Recheck Cond: visible
  • Filter: ("visibleInLists" AND ("mainImageId" IS NOT NULL) AND ("mainCategoryId" <> '8fe3ad7b-c685-4956-a075-340687536c56'::uuid) AND (COALESCE("markedAsNoveltyAt", "createdAt") < (now() + '10 days'::interval)) AND CASE WHEN ("markedAsNoveltyAt" IS NULL) THEN (("createdAt" > (now() - '90 days'::interval)) AND ("priceKop" > 0) AND (quantity > 0)) ELSE ("markedAsNoveltyAt" > (now() - '30 days'::interval)) END)
  • Rows Removed by Filter: 71794
  • Heap Blocks: exact=27916
6. 45.098 45.098 ↓ 1.9 74,860 1

Bitmap Index Scan on get_products_sort_idx (cost=0.00..7,521.88 rows=38,548 width=0) (actual time=45.098..45.098 rows=74,860 loops=1)

  • Index Cond: (("mainImageId" IS NOT NULL) = true)