Last active
October 7, 2018 08:27
-
-
Save daisukenishino2/5402109ba92be11f26058e163a1a770a to your computer and use it in GitHub Desktop.
Open棟梁:バッチ・サンプルの性能測定(1)に使用した、各種リソース情報と、その測定結果。
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
USE [Northwind] | |
GO | |
/****** Object: Table [dbo].[Orders2] Script Date: 09/18/2012 20:02:26 ******/ | |
SET ANSI_NULLS ON | |
GO | |
SET QUOTED_IDENTIFIER ON | |
GO | |
CREATE TABLE [dbo].[Orders2]( | |
[OrderID] [int] NOT NULL, | |
[CustomerID] [nchar](5) NULL, | |
[EmployeeID] [int] NULL, | |
[OrderDate] [datetime] NULL, | |
[RequiredDate] [datetime] NULL, | |
[ShippedDate] [datetime] NULL, | |
[ShipVia] [int] NULL, | |
[Freight] [money] NULL, | |
[ShipName] [nvarchar](40) NULL, | |
[ShipAddress] [nvarchar](60) NULL, | |
[ShipCity] [nvarchar](15) NULL, | |
[ShipRegion] [nvarchar](15) NULL, | |
[ShipPostalCode] [nvarchar](10) NULL, | |
[ShipCountry] [nvarchar](15) NULL, | |
CONSTRAINT [PK_Orders2] PRIMARY KEY CLUSTERED | |
( | |
[OrderID] ASC | |
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] | |
) ON [PRIMARY] | |
GO | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8" ?> | |
<ROOT> | |
-- DaoOrders2_D1_Insert | |
-- 2014/2/9 日立 太郎 | |
INSERT INTO | |
[Orders2] | |
( | |
<DELCMA> | |
<INSCOL name="OrderID">[OrderID],</INSCOL> | |
<INSCOL name="CustomerID">[CustomerID],</INSCOL> | |
<INSCOL name="EmployeeID">[EmployeeID],</INSCOL> | |
<INSCOL name="OrderDate">[OrderDate],</INSCOL> | |
<INSCOL name="RequiredDate">[RequiredDate],</INSCOL> | |
<INSCOL name="ShippedDate">[ShippedDate],</INSCOL> | |
<INSCOL name="ShipVia">[ShipVia],</INSCOL> | |
<INSCOL name="Freight">[Freight],</INSCOL> | |
<INSCOL name="ShipName">[ShipName],</INSCOL> | |
<INSCOL name="ShipAddress">[ShipAddress],</INSCOL> | |
<INSCOL name="ShipCity">[ShipCity],</INSCOL> | |
<INSCOL name="ShipRegion">[ShipRegion],</INSCOL> | |
<INSCOL name="ShipPostalCode">[ShipPostalCode],</INSCOL> | |
<INSCOL name="ShipCountry">[ShipCountry],</INSCOL> | |
</DELCMA> | |
) | |
VALUES | |
( | |
<DELCMA> | |
<IF>@OrderID,</IF> | |
<IF>@CustomerID,</IF> | |
<IF>@EmployeeID,</IF> | |
<IF>@OrderDate,</IF> | |
<IF>@RequiredDate,</IF> | |
<IF>@ShippedDate,</IF> | |
<IF>@ShipVia,</IF> | |
<IF>@Freight,</IF> | |
<IF>@ShipName,</IF> | |
<IF>@ShipAddress,</IF> | |
<IF>@ShipCity,</IF> | |
<IF>@ShipRegion,</IF> | |
<IF>@ShipPostalCode,</IF> | |
<IF>@ShipCountry,</IF> | |
</DELCMA> | |
) | |
</ROOT> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- DaoOrders2_S1_Insert | |
-- 2014/2/9 日立 太郎 | |
INSERT INTO | |
[Orders2] | |
( | |
[OrderID], | |
[CustomerID], | |
[EmployeeID], | |
[OrderDate], | |
[RequiredDate], | |
[ShippedDate], | |
[ShipVia], | |
[Freight], | |
[ShipName], | |
[ShipAddress], | |
[ShipCity], | |
[ShipRegion], | |
[ShipPostalCode], | |
[ShipCountry] | |
) | |
VALUES | |
( | |
@OrderID, | |
@CustomerID, | |
@EmployeeID, | |
@OrderDate, | |
@RequiredDate, | |
@ShippedDate, | |
@ShipVia, | |
@Freight, | |
@ShipName, | |
@ShipAddress, | |
@ShipCity, | |
@ShipRegion, | |
@ShipPostalCode, | |
@ShipCountry | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8" ?> | |
<ROOT> | |
SELECT | |
OrderID | |
FROM | |
Orders | |
ORDER BY | |
OrderID | |
</ROOT> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8" ?> | |
<ROOT> | |
SELECT | |
[OrderID], | |
[CustomerID], | |
[EmployeeID], | |
[OrderDate], | |
[RequiredDate], | |
[ShippedDate], | |
[ShipVia], | |
[Freight], | |
[ShipName], | |
[ShipAddress], | |
[ShipCity], | |
[ShipRegion], | |
[ShipPostalCode], | |
[ShipCountry] | |
FROM | |
[Orders] | |
WITH (UPDLOCK) | |
<WHERE> | |
WHERE | |
<LIST>AND [OrderID] IN(@OrderID)</LIST> | |
</WHERE> | |
</ROOT> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
USE [Northwind] | |
GO | |
DECLARE @Counter INT | |
SET @Counter = 1 | |
WHILE @Counter <= 2 | |
BEGIN | |
INSERT INTO [dbo].[Orders] | |
([CustomerID] | |
,[EmployeeID] | |
,[OrderDate] | |
,[RequiredDate] | |
,[ShippedDate] | |
,[ShipVia] | |
,[Freight] | |
,[ShipName] | |
,[ShipAddress] | |
,[ShipCity] | |
,[ShipRegion] | |
,[ShipPostalCode] | |
,[ShipCountry]) | |
VALUES | |
('VINET' | |
,5 | |
,GETDATE() | |
,GETDATE() | |
,GETDATE() | |
,3 | |
,32.38 | |
,'Vins et alcools Chevalier' | |
,'59 rue de l''Abbaye' | |
,'Reims' | |
,'RJ' | |
,51100 | |
,'France') | |
SET @Counter = @Counter + 1 | |
END | |
GO |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DECLARE cursorOrders cursor FOR SELECT * FROM [Northwind].[dbo].[Orders]; | |
DECLARE @OrderID [int]; | |
DECLARE @CustomerID [nchar](5); | |
DECLARE @EmployeeID [int]; | |
DECLARE @OrderDate [datetime]; | |
DECLARE @RequiredDate [datetime]; | |
DECLARE @ShippedDate [datetime]; | |
DECLARE @ShipVia [int]; | |
DECLARE @Freight [money]; | |
DECLARE @ShipName [nvarchar](40); | |
DECLARE @ShipAddress [nvarchar](60); | |
DECLARE @ShipCity [nvarchar](15); | |
DECLARE @ShipRegion [nvarchar](15); | |
DECLARE @ShipPostalCode [nvarchar](10); | |
DECLARE @ShipCountry [nvarchar](15); | |
-- カーソルオープン | |
OPEN cursorOrders | |
-- データを格納 | |
FETCH NEXT FROM cursorOrders | |
INTO @OrderID, @CustomerID, @EmployeeID ,@OrderDate ,@RequiredDate ,@ShippedDate ,@ShipVia ,@Freight ,@ShipName ,@ShipAddress ,@ShipCity ,@ShipRegion ,@ShipPostalCode ,@ShipCountry | |
-- カーソルのデータが終わるまで繰り返す | |
WHILE @@FETCH_STATUS = 0 | |
BEGIN | |
-- 繰り返し処理 | |
INSERT INTO [Northwind].[dbo].[Orders2] VALUES | |
(@OrderID, @CustomerID, @EmployeeID ,@OrderDate ,@RequiredDate ,@ShippedDate ,@ShipVia ,@Freight ,@ShipName ,@ShipAddress ,@ShipCity ,@ShipRegion ,@ShipPostalCode ,@ShipCountry); | |
-- データを格納 | |
FETCH NEXT FROM cursorOrders | |
INTO @OrderID, @CustomerID, @EmployeeID ,@OrderDate ,@RequiredDate ,@ShippedDate ,@ShipVia ,@Freight ,@ShipName ,@ShipAddress ,@ShipCity ,@ShipRegion ,@ShipPostalCode ,@ShipCountry | |
END | |
-- カーソル終了処理 | |
CLOSE cursorOrders | |
DEALLOCATE cursorOrders |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
INSERT INTO [Orders2] | |
SELECT * FROM [Orders] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
更に追加の測定
https://gist.github.com/daisukenishino2/6ab8fd7a9f6eb0c32782c73dc95c3f27