homework, pet project DE Dmitry_Medvedev #1

Open
dmitry_medvedev wants to merge 264 commits from md_branch into main
Showing only changes of commit fec0f8e103 - Show all commits
@@ -124,8 +124,8 @@ JOIN orders o ON u.id = o.user_id
JOIN order_items oi ON o.id = oi.order_id
JOIN products p ON oi.product_id = p.id
WHERE u.country = 'RU' AND p.category = 'Электроника';
-- Порядок чтения таблиц: order_items -> products -> orders -> users
-- Количество строк: order_items - 12, products - 3, orders - 1, users - 0
-- Порядок чтения таблиц: products -> order_items -> orders -> users
-- Количество строк: products - 3, order_items - 12, orders - 1, users - 0
-- Если у country и category будут индексы, то запрос ьудет выполняться побыстре, потому что будет Index Scan, а не Seq Scan