Do not use on any
shared computer
September 7, 2008 09:24am pdt
 
[x]
Attachment Details

DB2 Performance Relatated Issues

Zone: DB2 Database
Tags: db2, performance, merge
         Hi!

I have been doing some research regarding to performance on DB2 on both LUW and Mainframe and I want to throw out a question to other DB2 Experts to clarify few things.
The scenario is:
View on a table with indexes that are nearly optimal for the view.
The view limits the user to see sertain cols and rows by using current sqlid in the where clause like this
  where colA >  case when substr(current sqlid, 1, 3) like 'UP%' then 00 .....
  and colB > case when substr(current sqlid, 1, 3) like 'UP%' then AA .....
  .....
Now a user or package executes a sql query on that view.
The questions are :
   How does DB2 execute the query ?
   Does DB2 merge the view and sql query to a Nested Query and then execute it or execute them separatly and
   then merge the results ?
   If I had an optimal index on the view I would probably have gained a slight better performance on the overall
   process ?

Best regards,
    Tomas Helgi
Start your free trial to view this solution
Question Stats
Zone: Database
Question Asked By: TomasHelgi
Question Asked On: 12.07.2007
Participating Experts: 2
Points: 500
Views: 0
Translate:
Loading Advertisement...
 
[+][-]Expert Comment by momi_sabag

Rank: Wizard

Expert Comment by momi_sabag:

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
 
[+][-]Expert Comment by ocgstyles
Expert Comment by ocgstyles:

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
 
Loading Advertisement...
20080723-EE-VQP-34 / EE_QW_EXPERT_20070906