                                                                                     QUERY PLAN                                                                                      
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
 Limit  (cost=888838.60..888838.60 rows=1 width=8) (actual time=10925.691..10925.696 rows=1 loops=1)
   Buffers: shared hit=531372
   ->  Sort  (cost=888838.60..888838.60 rows=1 width=8) (actual time=10925.689..10925.693 rows=1 loops=1)
         Sort Key: (count(*))
         Sort Method: quicksort  Memory: 25kB
         Buffers: shared hit=531372
         ->  Aggregate  (cost=888838.58..888838.59 rows=1 width=8) (actual time=10925.661..10925.665 rows=1 loops=1)
               Buffers: shared hit=531369
               ->  Nested Loop  (cost=2722.01..888820.83 rows=7101 width=0) (actual time=44.954..10924.136 rows=7395 loops=1)
                     Buffers: shared hit=531369
                     ->  Hash Join  (cost=2721.71..884793.62 rows=74409 width=4) (actual time=23.097..10844.113 rows=74521 loops=1)
                           Hash Cond: (store_sales.ss_store_sk = store.s_store_sk)
                           Buffers: shared hit=518310
                           ->  Hash Join  (cost=2715.26..883239.32 rows=567130 width=8) (actual time=21.935..10721.183 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..3867.045 rows=28800991 loops=1)
                                       Buffers: shared hit=516908
                                 ->  Hash  (cost=2693.00..2693.00 rows=1781 width=4) (actual time=21.799..21.800 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=8.021..21.301 rows=1800 loops=1)
                                             Filter: ((t_minute >= 30) AND (t_hour = 8))
                                             Rows Removed by Filter: 84600
                                             Buffers: shared hit=1397
                           ->  Hash  (cost=6.28..6.28 rows=14 width=4) (actual time=0.087..0.087 rows=14 loops=1)
                                 Buckets: 1024  Batches: 1  Memory Usage: 9kB
                                 Buffers: shared hit=5
                                 ->  Seq Scan on store  (cost=0.00..6.28 rows=14 width=4) (actual time=0.010..0.079 rows=14 loops=1)
                                       Filter: ((s_store_name)::text = 'ese'::text)
                                       Rows Removed by Filter: 88
                                       Buffers: shared hit=5
                     ->  Result Cache  (cost=0.29..0.31 rows=1 width=4) (actual time=0.001..0.001 rows=0 loops=74521)
                           Cache Key: store_sales.ss_hdemo_sk
                           Hits: 70167  Misses: 4354  Evictions: 0  Overflows: 0  Memory Usage: 305kB
                           Buffers: shared hit=13059
                           ->  Index Scan using household_demographics_pkey on household_demographics  (cost=0.28..0.30 rows=1 width=4) (actual time=0.005..0.005 rows=0 loops=4354)
                                 Index Cond: (hd_demo_sk = store_sales.ss_hdemo_sk)
                                 Filter: (hd_dep_count = 5)
                                 Rows Removed by Filter: 1
                                 Buffers: shared hit=13059
 Planning:
   Buffers: shared hit=473
 Planning Time: 2.721 ms
 Execution Time: 10926.169 ms
(45 rows)

