1.Foreign key column with vs. without an index
order_items.order_id has an index but product_id does not. Even on the same 750k-row table, a missing index forces a full table scan (Seq Scan).
SELECT * FROM order_items WHERE product_id = 777;
SELECT * FROM order_items WHERE order_id = 777;