If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > Index usage on federated table access

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 11-03-06, 01:44
sundaram sundaram is offline
Registered User
 
Join Date: Mar 2006
Posts: 104
Index usage on federated table access

DB2 8.2.6 windows 2000 platform

I have a view defined as a join of a federated table (nickname pointing a table in another database) and a local table. Both table have identical indexes.

Question.

Does DB2 use indexes on both the tables when a select is issued on the view?

Thanks
Reply With Quote
  #2 (permalink)  
Old 11-03-06, 02:13
grofaty grofaty is offline
Registered User
 
Join Date: Jan 2003
Posts: 1,570
Hi,
There is no garantee that DB2 will use index. You need to check it out with SQL access path.

If index is created after nickname creation, you should recreate nickname, because at nickname creation all statistics on source table are collected and stored to local database catalog.

Hope this helps,
Grofaty
Reply With Quote
  #3 (permalink)  
Old 11-03-06, 03:05
sathyaram_s sathyaram_s is offline
Super Moderator
 
Join Date: Aug 2001
Location: UK
Posts: 4,534
Given your scenario, I doubt indexes to be used .. Data will be shipped (likely from remote to local db) and then a join performed. Index on the remote table is a remote structure and therefore cannot be used to join with a local table.

HTH

Sathyaram
__________________
Visit the new-look IDUG Website , register to gain access to the excellent content.
Reply With Quote
  #4 (permalink)  
Old 11-03-06, 03:13
guyprzytula guyprzytula is offline
Registered User
 
Join Date: Jun 2006
Posts: 471
federated

the access plan should show where the join is performed, local or remote.
there are some settings for federated db, that will push to the max, the data to the remote server and execute the join at remote server ..
see info center and federated..
__________________
Best Regards, Guy Przytula
DB2 UDB LUW certified V6/7/8
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On