From af045e5edd8223ff1eed338295981da5df197cc4 Mon Sep 17 00:00:00 2001
From: Andrew <saintruler@gmail.com>
Date: Fri, 10 Dec 2021 22:42:52 +0400
Subject: =?UTF-8?q?=D0=94=D0=BE=D0=B1=D0=B0=D0=B2=D0=B8=D0=BB=20=D0=BE?=
 =?UTF-8?q?=D1=82=D1=87=D1=91=D1=82=20=D0=BF=D0=BE=20=D1=87=D0=B5=D1=82?=
 =?UTF-8?q?=D0=B2=D1=91=D1=80=D1=82=D0=BE=D0=BC=D1=83=20=D0=B7=D0=B0=D0=B4?=
 =?UTF-8?q?=D0=B0=D0=BD=D0=B8=D1=8E.?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 task4_requests.sql | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

(limited to 'task4_requests.sql')

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
-- 
cgit v1.2.3

