Ian,

The two statements are different in the eyes of the DB2 optimizer, the
second statement would have to go through the entire optimization process
just as if the first statement never happened.

Bill Gallagher, DBA
Phoenix Home Life
Enfield, CT  06083



                                                                                       
                                     
                   "Ian D. Bjorhovde"                                                  
                                     
                   <[EMAIL PROTECTED]>        To:     [EMAIL PROTECTED]     
                                     
                   Sent by:                      cc:                                   
                                     
                   [EMAIL PROTECTED]        Subject:     Re: DB2EUG: Overhead for 
Dynamic SQL in UDB/AIX?              
                   a.best.com                                                          
                                     
                                                                                       
                                     
                                                                                       
                                     
                   03/21/01 02:12 PM                                                   
                                     
                   Please respond to                                                   
                                     
                   db2eug                                                              
                                     
                                                                                       
                                     
                                                                                       
                                     





----- Original Message -----
From: "Juan Lanus" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, March 21, 2001 9:02 AM
Subject: Re: DB2EUG: Overhead for Dynamic SQL in UDB/AIX?


> Hi, Bill
>
> Please let me throw two ideas I'm sure you are already aware of:
>
> 1- DB2 caches dymanic SQL statements. The great advantage of those
> parameter markers is that they help the optimizer to recognize repeating
> statements even with different data.

Juan,

For the following two statements:

update mytable set (a,b,c,d,e) = (1,2,3,4,5) where f = 1;
update mytable set (a,b,c,d,e) = (6,7,8,9,0) where f = 2;

Are you saying that, (without using parameter markers), DB2 should
get a hit in the package cache for the second statement?


Thanks,


ian d. bjorhovde                       cephalad corporation
   [EMAIL PROTECTED]                   intelligent solutions for
      http://cephalad.com                    systems and data management



=====
To unsubscribe, send 'unsubscribe' to [EMAIL PROTECTED]
For other info (and scripts), see
http://people.mn.mediaone.net/scottrmcleod





=====
To unsubscribe, send 'unsubscribe' to [EMAIL PROTECTED]
For other info (and scripts), see http://people.mn.mediaone.net/scottrmcleod

Reply via email to