movies_development=# select (select count(*) from movies) as movies,
                            (select count(*) from theatres) as theatres,
                            (select count(*) from movie_showtimes) as showtimes,
                            (select count(*) from orders) as orders,
                            (select count(*) from purchased_tickets) as tickets;
 movies | theatres | showtimes | orders | tickets
--------+----------+-----------+--------+---------
     44 |        6 |     20201 | 218593 | 218591

movies_development=# explain analyze
   select id
     from movie_showtimes_with_current_and_sold_out_unmaterialized
   where current = true
     and sold_out = false;
Total runtime: 1158.617 ms

movies_development=# explain analyze
   select id
     from movie_showtimes_with_current_and_sold_out
   where current = true
     and sold_out = false;
Total runtime: 12.553 ms


