On performance using views
Posted in 2008
Topics: Performance & Tuning, Stored Procedures & SPL, Server Administration, Platform-Specific Issues, Versions, Editions & End-of-Life
Hi.
Some of my workmates are using views very often into stored procedures. We found out that many times performance of this SPs is very poor, but if we execute some of the most heavy queries in dbaccess, they behave ok - I mean, in a short time and without any strange thing depicted by sqexplain.out -. We had tried many things related with some problems we found - exchanging some unions for two views, improving some "or" conditions, and avoiding to use calculated-fields as filters - without exceptional improve.
The underlying idea about our coding was that we can use a view as a table - with some restrictions we have discovered by an by - Do you think this idea is wrong? Which are the restrictions on doing so? Is there some onconfig parameter which can help improving view use?
Our plattform is a Solaris 9 running IDS 9.40 FC7
Thanks in advance
Omar Muñoz.
what is optcompind set to??
if not set to 0 then try 0 the run update stats for the spl.
you could try and set explain on for it see what the differences are
between good and bad.
Also be carefull with datatypes used... so a select from sometable
where charcolum = intvalue
is not what you want...
Superboer.
On 30 okt, 23:49, Omar Muñoz <omar...@yahoo.com> wrote:
> Hi.
>
> Some of my workmates are using views very often into stored procedures. We found out that many times performance of this SPs is very poor, but if we execute some of the most heavy queries in dbaccess, they behave ok - I mean, in a short time and without any strange thing depicted by sqexplain.out -. We had tried many things related with some problems we found - exchanging some unions for two views, improving some "or" conditions, and avoiding to use calculated-fields as filters - without exceptional improve.
>
> The underlying idea about our coding was that we can use a view as a table - with some restrictions we have discovered by an by - Do you think this idea is wrong? Which are the restrictions on doing so? Is there some onconfig parameter which can help improving view use?
>
> Our plattform is a Solaris 9 running IDS 9.40 FC7
>
> Thanks in advance
>
> Omar Muñoz.