                                                                           QUERY PLAN                                                                           
----------------------------------------------------------------------------------------------------------------------------------------------------------------
 Limit  (cost=893685.25..893685.26 rows=1 width=8) (actual time=11235.284..11235.290 rows=1 loops=1)
   Buffers: shared hit=624883
   ->  Sort  (cost=893685.25..893685.26 rows=1 width=8) (actual time=11235.282..11235.286 rows=1 loops=1)
         Sort Key: (count(*))
         Sort Method: quicksort  Memory: 25kB
         Buffers: shared hit=624883
         ->  Aggregate  (cost=893685.23..893685.24 rows=1 width=8) (actual time=11235.252..11235.256 rows=1 loops=1)
               Buffers: shared hit=624880
               ->  Nested Loop  (cost=2867.40..893667.48 rows=7101 width=0) (actual time=45.868..11233.617 rows=7395 loops=1)
                     Buffers: shared hit=624880
                     ->  Hash Join  (cost=2867.26..884880.87 rows=54121 width=4) (actual time=26.786..11088.450 rows=53899 loops=1)
                           Hash Cond: (store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk)
                           Buffers: shared hit=518358
                           ->  Hash Join  (cost=2715.26..883239.32 rows=567130 width=8) (actual time=20.923..10963.038 rows=551977 loops=1)
                                 Hash Cond: (store_sales.ss_sold_time_sk = time_dim.t_time_sk)
                                 Buffers: shared hit=518305
                                 ->  Seq Scan on store_sales  (cost=0.00..804917.92 rows=28800992 width=12) (actual time=0.005..3880.341 rows=28800991 loops=1)
                                       Buffers: shared hit=516908
                                 ->  Hash  (cost=2693.00..2693.00 rows=1781 width=4) (actual time=20.783..20.784 rows=1800 loops=1)
                                       Buckets: 2048  Batches: 1  Memory Usage: 80kB
                                       Buffers: shared hit=1397
                                       ->  Seq Scan on time_dim  (cost=0.00..2693.00 rows=1781 width=4) (actual time=7.274..20.290 rows=1800 loops=1)
                                             Filter: ((t_minute >= 30) AND (t_hour = 8))
                                             Rows Removed by Filter: 84600
                                             Buffers: shared hit=1397
                           ->  Hash  (cost=143.00..143.00 rows=720 width=4) (actual time=1.664..1.664 rows=720 loops=1)
                                 Buckets: 1024  Batches: 1  Memory Usage: 34kB
                                 Buffers: shared hit=53
                                 ->  Seq Scan on household_demographics  (cost=0.00..143.00 rows=720 width=4) (actual time=0.136..1.462 rows=720 loops=1)
                                       Filter: (hd_dep_count = 5)
                                       Rows Removed by Filter: 6480
                                       Buffers: shared hit=53
                     ->  Index Scan using store_pkey on store  (cost=0.14..0.16 rows=1 width=4) (actual time=0.002..0.002 rows=0 loops=53899)
                           Index Cond: (s_store_sk = store_sales.ss_store_sk)
                           Filter: ((s_store_name)::text = 'ese'::text)
                           Rows Removed by Filter: 1
                           Buffers: shared hit=106522
 Planning:
   Buffers: shared hit=473
 Planning Time: 2.545 ms
 Execution Time: 11235.422 ms
(41 rows)

