Skip to Content
0
Former Member
Feb 27, 2014 at 08:12 PM

problem using sp_opt_querystats

46 Views

The stored procedure can be very useful, but I can not make it work with all the option proposed in sp_opt_querystats help, here is an example

exec

sp_opt_querystats "select * from POS where br_number='XyZ' and acc_number='0000097' and cur_code='USD'","plancost",mydatabase.

the result is NULL output

[ BEGIN QUERY ANALYSIS ]

[ END QUERY ANALYSIS ]
the same no result is produced with

exec

sp_opt_querystats "select * from POS where br_number='XyZ' and acc_number='0000097' and cur_code='USD'","plancost",mydatabase.

[ BEGIN QUERY ANALYSIS ]

[ END QUERY ANALYSIS ]

Some other options such showplan statio etc are working fine.

Am I misusing the proc or there are shortcomings in it, The version of my ASE is:

Adaptive Server Enterprise/15.7/EBF 21342 SMP SP101 /P/Solaris AMD64/OS 5.10/ase157sp101/3439/64-bit/FBO/Thu Jun 6 16:33:15 2013