API/CodeSamples/1-Million-Record-View.md
... ...
@@ -0,0 +1,41 @@
1
+#1 Million Record View
2
+
3
+##About
4
+
5
+Below is the SQL sample to create a View with 1 million records using the Northwind example database. This query can be used to load test your application with before you send it out to production.
6
+
7
+```sql
8
+CREATE View [1MOrders] AS
9
+SELECT TOP 1000000
10
+ [Orders].[OrderID]
11
+ ,[CustomerID]
12
+ ,[OrderDate]
13
+ ,[RequiredDate]
14
+ ,[ShippedDate]
15
+ ,[ShipVia]
16
+ ,[Freight]
17
+ ,[ShipName]
18
+ ,[ShipAddress]
19
+ ,[ShipCity]
20
+ ,[ShipRegion]
21
+ ,[ShipPostalCode]
22
+ ,[ShipCountry]
23
+ ,[Order Details].[UnitPrice]
24
+ ,[Quantity]
25
+ ,[Discount]
26
+ ,[Products].[ProductID]
27
+ ,[ProductName]
28
+ ,[QuantityPerUnit]
29
+ ,[UnitsInStock]
30
+ ,[UnitsOnOrder]
31
+ ,[ReorderLevel]
32
+ ,[Discontinued]
33
+ ,[CategoryName]
34
+ ,[Description]
35
+
36
+FROM Orders
37
+JOIN [Order Details] ON [Order Details].[OrderID] = [Orders].[OrderID]
38
+CROSS JOIN Products
39
+CROSS JOIN Categories
40
+GO
41
+```
... ...
\ No newline at end of file