Level 4 boss: the slow dashboard

An admin dashboard runs five queries and every one reads whole tables. Make each read only what it shows, with no more than two new indexes on orders.

Checking your access…