- 论坛徽章:
- 0
|
select workitemid, workitemname, actionurl, processinstid from WFWorkItem where currentstate=10 and participant="2" order by workitemid desc。
以上sql,在sybase15.03中,如何建立索引。
目前查询计划如下:
QUERY PLAN FOR STATEMENT 1 (at line 1).
STEP 1
The type of query is SELECT.
2 operator(s) under root
|ROOT:EMIT Operator (VA = 2)
|
| |SORT Operator (VA = 1)
| | Average Row width is 36.250000
| | Using Worktable1 for internal storage.
| |
| | |SCAN Operator (VA = 0)
| | | FROM TABLE
| | | WFWorkItem
| | | Index : IDX_WFWI_PARTICI
| | | Forward Scan.
| | | Positioning by key.
| | | Keys are:
| | | participant ASC
| | | Using I/O Size 16 Kbytes for index leaf pages.
| | | With LRU Buffer Replacement Strategy for index leaf pages.
| | | Using I/O Size 16 Kbytes for data pages.
| | | With LRU Buffer Replacement Strategy for data pages.
目前25W数据,大约需要1秒的时间才能完成。该表的数据会持续增长,导致时间会越来越长。
IDX_WFWI_PARTICI 此索引基于 participant 字段,没有排序。 |
|