I’m querying Sybase database from C# code. Is there any good query analyzer to understand the exact queries being generated like the Query Analyzer for Sql Server?
You can set some Sybase variables to see the Query Plan such as the following:
set showplan on set statistics io on set statistics time on exec my_proc (my_arg1, my_arg2, ...) go
I have put this into a shell script to pass the command line arguments including stored procedure name and parameters.
isql -Uxxx -Pyyy <<-_EOF_ set showplan on set statistics io on set statistics time on exec $* go _EOF_
You use this to see if there are any table scans which should be avoided at all costs.
Good SQL, good night.