- 论坛徽章:
- 0
|
- -bash-3.00$ isql -SRanan -Usa -P
- 1> set showplan on
- 2> go
- 1> set statistics io,time on
- 2> go
- QUERY PLAN FOR STATEMENT 1 (at line 1).
- STEP 1
- The type of query is SET STATISTICS ON.
- Total writes for this command: 0
- Execution Time 0.
- SQL Server cpu time: 0 ms. SQL Server elapsed time: 6 ms.
- 1> select getdate()
- 2> go
- QUERY PLAN FOR STATEMENT 1 (at line 1).
- STEP 1
- The type of query is SELECT.
- Parse and Compile Time 0.
- SQL Server cpu time: 0 ms.
- --------------------------
- Jan 9 2006 12:34PM
- Total writes for this command: 0
- Execution Time 0.
- SQL Server cpu time: 0 ms. SQL Server elapsed time: 0 ms.
- (1 row affected)
- 1> use ESBIS
- 2> go
- QUERY PLAN FOR STATEMENT 1 (at line 1).
- STEP 1
- The type of query is USE DATABASE.
- Parse and Compile Time 0.
- SQL Server cpu time: 0 ms.
- Total writes for this command: 0
- Execution Time 0.
- SQL Server cpu time: 0 ms. SQL Server elapsed time: 0 ms.
- 1> select convert(varchar(20),getdate(),9)
- 2> SELECT ReceiveID,StockID,ReceiveDate,SumVariety,Priority,(CASE (select count(*) from Prod_Dispense where (Status ='05'OR Status ='06') AND SourceID = r.ReceiveID) WHEN 0 then '04' else '05' END) AS Status,
- 3> (select max(distinct l.TempAreaID) + '区' from Logi_ReceiveList l where r.ReceiveID = l.ReceiveID) as TempAreaID,
- 4> ProvName,DeptName,(SELECT Distinct DealMode FROM Prod_Dispense WHERE SourceID = r.ReceiveID) AS DealMode
- 5> FROM Logi_Receive r LEFT OUTER JOIN Bas_Prov ON Bas_Prov.ProvID = r.ProviderID LEFT OUTER JOIN Bas_DeptInfo ON Bas_DeptInfo.DeptID = r.FillDeptID
- 6> WHERE ReceiveID IN (SELECT Distinct SourceID FROM Prod_Dispense WHERE Status IN ('04','05'))
- 7> ORDER BY DealMode ASC,Priority desc, AuditDate ASC
- 8> select convert(varchar(20),getdate(),9)
- 9> go
- ...
- Table: Prod_Dispense scan count 1, logical reads: (regular=5717 apf=0
- total=5717), physical reads: (regular=5714 apf=0 total=5714), apf IOs used=0
- Table: Logi_ReceiveList scan count 202, logical reads: (regular=2998 apf=0
- total=2998), physical reads: (regular=676 apf=0 total=676), apf IOs used=0
- Table: Prod_Dispense scan count 1, logical reads: (regular=5717 apf=0
- total=5717), physical reads: (regular=0 apf=0 total=0), apf IOs used=0
- Table: Logi_Receive scan count 1, logical reads: (regular=1651 apf=0
- total=1651), physical reads: (regular=1603 apf=0 total=1603), apf IOs used=0
- Table: Bas_Prov scan count 9736, logical reads: (regular=29683 apf=0
- total=29683), physical reads: (regular=100 apf=0 total=100), apf IOs used=0
- Table: Bas_DeptInfo scan count 9736, logical reads: (regular=9740 apf=0
- total=9740), physical reads: (regular=3 apf=0 total=3), apf IOs used=0
- Table: Prod_Dispense scan count 1, logical reads: (regular=5717 apf=0
- total=5717), physical reads: (regular=0 apf=0 total=0), apf IOs used=0
- Table: Worktable1 scan count 202, logical reads: (regular=63186 apf=0
- total=63186), physical reads: (regular=0 apf=0 total=0), apf IOs used=0
- Table: Worktable2 scan count 202, logical reads: (regular=65238 apf=0
- total=65238), physical reads: (regular=0 apf=0 total=0), apf IOs used=0
- Table: Worktable3 scan count 0, logical reads: (regular=240 apf=0 total=240),
- physical reads: (regular=0 apf=0 total=0), apf IOs used=0
- Table: Worktable4 scan count 9736, logical reads: (regular=21174 apf=0
- total=21174), physical reads: (regular=0 apf=0 total=0), apf IOs used=0
- Total writes for this command: 4216
- Execution Time 8.
- SQL Server cpu time: 800 ms. SQL Server elapsed time: 35676 ms.
- (202 rows affected)
- --------------------
- Jan 9 2006 12:38:52
- Total writes for this command: 0
- Execution Time 0.
- SQL Server cpu time: 0 ms. SQL Server elapsed time: 0 ms.
- (1 row affected)
- 1>
复制代码 |
|