summaryrefslogtreecommitdiff
path: root/task4_requests.sql
diff options
context:
space:
mode:
authorAndrew <saintruler@gmail.com>2021-12-10 22:42:52 +0400
committerAndrew <saintruler@gmail.com>2021-12-10 22:42:52 +0400
commitaf045e5edd8223ff1eed338295981da5df197cc4 (patch)
treef99720716896b7d87ff2f5b5e72741a6797adfc3 /task4_requests.sql
parent6e1b88adf21930ce7d6ec44bbbe334d92625c986 (diff)
Добавил отчёт по четвёртому заданию.
Diffstat (limited to 'task4_requests.sql')
-rw-r--r--task4_requests.sql10
1 files changed, 6 insertions, 4 deletions
diff --git a/task4_requests.sql b/task4_requests.sql
index c364b95..71e2fbe 100644
--- a/task4_requests.sql
+++ b/task4_requests.sql
@@ -2,11 +2,12 @@
-- Кластерный индекс --
-----------------------
-SELECT amount FROM Payments WHERE order_id=12412;
+SELECT * INTO Customers_copy FROM Customers
+GO
-CREATE CLUSTERED INDEX Payments_Clustered ON Payments (order_id);
+SELECT * FROM Customers WHERE id=12345;
GO
-DROP INDEX Payments_Clustered ON Payments;
+SELECT * FROM Customers_copy WHERE id=12345;
GO
--------------------------
@@ -69,7 +70,8 @@ GO
SELECT SUM(amount) FROM Payments WHERE date >= '2021-12-01';
-CREATE INDEX Payments_Filtered ON Payments (amount) WHERE date >= '2021-12-01';
+CREATE INDEX Payments_Filtered ON Payments (amount)
+ WHERE date >= '2021-12-01';
GO
DROP INDEX Payments_Filtered ON Payments;
GO