
CHAPTER 5 Implement: Making Required Application Changes
49
This trace flag is well-documented in
New Functionality in 11.9.2 at
http://manuals.sybase.com:80/onlinebooks/group-
as/asg1192e/asefun92/@Generic__BookView
and the sections on query tuning
in the
Performance and Tuning Guide at
http://manuals.sybase.com:80/onlinebooks/group-
as/asg1200e/aseperf/@Generic__BookView
.
Syntax for Trace Flag
302
When using trace flag (302) to see optimizer information, use trace flag 3604
to send output to the client. (You can use trace flag 3605 to send output to the
errorlog, but this is not recommended.) The syntax looks like this:
dbcc traceon (3604,302)
Trace flag 302 output has been divided into the following “blocks” of related
information:
• The Table Information Block
• The Base Cost Block
•The Clause Block
• The Column Block
• The Index Selection Block
• The Best Access Block
The following is an example of trace flag 302 output:
*******************************
Beginning selection of qualifying indexes for table
’lineitem’,
varno = 0, objectid 240003886.
The table (Datarows) has 600572 rows, 44308 pages,
The table’s Data Page Cluster Ratio 0.999990
Table scan cost is 600572 rows, 44489 pages,
using no data prefetch (size 2K I/O),
in data cache ’default data cache’ (cacheid 0) with MRU
replacement
Selecting best index for the SEARCH CLAUSE:
lineitem.l_partkey = 2000
lineitem.l_orderkey > 10000
Estimated selectivity for l_orderkey,
selectivity = 0.983249, upper limit = 1.000000.
Estimated selectivity for l_partkey,
selectivity = 0.000052, upper limit = 0.052686.
Estimating selectivity of index ’lineitem_lorder’,
Commenti su questo manuale