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 > Informix > Informix views and indexes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 10-08-07, 15:54
rbshevlin rbshevlin is offline
Registered User
 
Join Date: Oct 2007
Posts: 5
Informix views and indexes

I am running Informix 10 and have a question about indexes on view. I have a table that has an associated view. The view is basically an exact copy of the table, column for column, except that one column calls an external function to return a "Clear form of an encrypted value (the column in the table is encrypted and the the column in the view appears "in the clear"). Since the table and view are pretty much identical (the encrypted column is not indexed) do I need to create indexes on the view or will the database know to utilize the indexes on the table? Would I "buy" anything by creating separate indexes in the view? FYI - the table contains approx 32 million rows, rows length of 370 characters, and there are currently 12 indexes on the table.
Reply With Quote
  #2 (permalink)  
Old 10-28-07, 16:09
RobP RobP is offline
Registered User
 
Join Date: Mar 2004
Location: Netherlands
Posts: 183
Hi,

Due to the fact that views in Informix are not materialized, it is not possible to put indexes on views. Informix will always just rewrite the query to execute the query on the real tables. Of course it will re-use any existing indexes on the underlying table(s).

Greetz,

RobP
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