高手帮忙,表的数据库量过大,查询无响应
服务器一张表中记录数达600多万条,我执行查询操作时,半天没有响应其中索引在建表的时候已建,是不是索引创建的不合理造成的,需不需要重建,重建的话这么大的数据库量会不会影响查询的结果!
SQL语句执行计划如下,可惜小弟看不太明白,请高手指点一二了!!!
STEP 1
The type of query is INSERT.
The update mode is direct.
Worktable1 created, in allpages locking mode, for ORDER BY.
FROM TABLE
ZN3ta03
Nested iteration.
Using Clustered Index.
Index : ZN3ta03_8278629851
Forward scan.
Positioning by key.
Keys are:
offinumASC
Using I/O Size 8 Kbytes for data pages.
With LRU Buffer Replacement Strategy for data pages.
TO TABLE
Worktable1.
STEP 2
The type of query is SELECT.
This step involves sorting.
FROM TABLE
Worktable1.
Using GETSORTED
Table Scan.
Forward scan.
Positioning at start of table.
Using I/O Size 8 Kbytes for data pages.
With MRU Buffer Replacement Strategy for data pages. 急啊,各位高手帮帮忙忙,帮我解决这个小问题
在线等!!! 你这基本上是表扫描
加索引 Worktable1 created, in allpages locking mode, for ORDER BY.
FROM TABLE
ZN3ta03
Nested iteration.
Using Clustered Index.
Index : ZN3ta03_8278629851
从这个来看你是对ZN3ta03表进行查询,这个select 用上了索引ZN3ta03_8278629851,
但对结果集合用order by,所以有临时表的操作,而对于临时表,只会有表扫描,
FROM TABLE
Worktable1.
Using GETSORTED
Table Scan.
ZN3ta03的总记录600万,select 的结果集大概有多少?可能要看具体的select语句和数据的情况分析了。
页:
[1]