Welcome to dbFreaks.com!
FAQFAQ    SearchSearch      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

composite in clause

 
   Database Help (Home) -> DB2 RSS
Next:  Last Call for Papers: The 2011 International Conf..  
Author Message
Herb

External


Since: May 13, 2011
Posts: 1



(Msg. 1) Posted: Fri May 13, 2011 11:48 am
Post subject: composite in clause
Archived from groups: comp>databases>ibm-db2 (more info?)

will DB2 use the index for a SQL like this?
i have an index on the A table like this +ORD_NBR+LD_STP_NBR
+REC_STT

Select .....
from .....
where .....

OR ((A.ORD_NBR , A.LD_STP_NBR) IN

( SELECT AA.ORD_NBR, B.LD_STP_NBR From........)

 >> Stay informed about: composite in clause 
Back to top
Login to vote
Tonkuma

External


Since: Jan 30, 2008
Posts: 76



(Msg. 2) Posted: Fri May 13, 2011 4:55 pm
Post subject: Re: composite in clause [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

You can check by yourself using explain functionalities of DB2.

 >> Stay informed about: composite in clause 
Back to top
Login to vote
Display posts from previous:   
Related Topics:
Doubts about the "For Read Only" clause - Hi, I had the following doubts about the "For Read Only" clause. 1. How does a "for Read only" clause improve the performance? 2. How does a "for Read only" clause compare with "With UR" clause in performance? Wh...

Parameter markers in LIKE clause - Hi! Is it possible to use parameter markers like this: 1.) SELECT * FROM TABLE1 WHERE FIELD1 LIKE '%?%' If I now set parameter 1 to '' (empty string) I don't get any rows back, but if I run: 2.) SELECT * FROM TABLE1 WHERE FIELD1 LIKE '%%' I get back..

use a generated column in a where clause - I have a huge table and I have the following requirement : Table1 --------- client day_of_sale qty Table2 --------- same ddl Now table2 needs to have the same data except for the first day_of_sale value for each client. So I have the query select..

WITH clause vs global temp table - Can someone point me to good documentation on 'WITH clause" ? (I couldn't get much out of Queries section from SQL Reference manual). We are getting better performance when we explicity use global temp tables to store intermediate results than using...

Load from nickname uses order by clause - Hi I declared a cursor with selection on nickname, to load to a local table. It is loading fine, but slow, and on investigation, I found the query got rewritten with order by clause in the source db. Since the table is huge, this is taking lot of time. I...
   Database Help (Home) -> DB2 All times are: Pacific Time (US & Canada)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You can edit your posts in this forum
You can delete your posts in this forum
You can vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]