I have been profiling a number of functions and procedures and this has highlighted a big difference (in the wrong direction, unfortunately) in performance of some individual statements within a number of functions after moving from v10.0.1 to 12.0.1.
Some of these statements are not straight selects or updates, but are in the form of a Watcom IF connstruct eg:
if VacID is not null and(exists(select 1 from Progress where Progress.VacancyID = VacID and Progress.PersonID = persid and Progress.status = '.') or exists(select 1 from Progress where Progress.VacancyID = VacID and Progress.PersonID = persid and Progress.noreemploy = 1)) then return 'V' end if;
This is just one of half a dozen similarly constructed statements in the function.
The application profiling / tracing viewer treats everything between the initial BEGIN and the final END as a single statement, so no plan is available. Obviously I could rewrite the statement as something like
select if VacID is not null and(exists(select 1 from Progress where Progress.VacancyID = VacID and Progress.PersonID = persid and Progress.status = '.') or exists(select 1 from Progress where Progress.VacancyID = VacID and Progress.PersonID = persid and Progress.noreemploy = 1)) then 1 else 0 endif
then run that from isql and get a plan, but the query isn't quite the same and the context is quite different.
Is there some way of getting the plans for such statements as the are actually executed, in the context of the function / procedure?
UPDATE
Screen shot showing how the whole procedure is treated as a single statement, with no plan tab
Request clarification before answering.
I really don't understand, why only SA still don't has convenient mechanism for getting plans of any sql statements, without voodoo. Using Tracing/LogExpensiveQueries is not that thing that all wants today. For some statement 1min is very fast, for another -1ms - very slow. So how to use LogExpensiveQueries in that case? Please, just give us simple mechanism getting any plans without voodoo, like any other RDBMS has.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
"A simple mechanism for getting plans without voodoo" is a good description of a much needed improvement... too bad it lacks management appeal.
Let's see... paradigm shift... adaptive server... unwired enterprise...
...got it! cloud computing!
How about "A simple mechanism for getting plans to improve cloud performance"?
...what's the current value of the brandnew BUZZWORD_LEVEL option...?
I'm sure it's essential for implementing IP6 🙂 or even better BIG DATA - the last one is even has the advantage of being true
And now is the time to give the slight pointer that in German (or my particular region), "Fuji" sounds similar to the colloquial "futsch" or its "italized" version "futÂschiÂkaÂto" - both meaning
lost, gone, broken
Some may claim that's a very fitting association with a cloud-based database, others may not...
| User | Count |
|---|---|
| 5 | |
| 4 | |
| 4 | |
| 3 | |
| 2 | |
| 2 | |
| 2 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.