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 > Maniplulating indexkey on sysindices

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 10-21-03, 07:35
Bob Elliot Bob Elliot is offline
Registered User
 
Join Date: Jan 2003
Posts: 6
Maniplulating indexkey on sysindices

I am assuming this is an opaque data type.

Is it possible to select from the various fields in indexkey.

Where are these methods documented.

My background predates these structures.

Last edited by Bob Elliot; 10-21-03 at 08:23.
Reply With Quote
  #2 (permalink)  
Old 10-22-03, 11:49
Roelwe Roelwe is offline
Registered User
 
Join Date: Aug 2002
Location: Belgium
Posts: 534
From the SQL Reference Guide:


INDEXKEYARRAY
This column has a maximum of three fields,
displayed in the following form:

<function id>(col1, ... , coln) [operator class id]


The fields within the indexkeys columns have the following significance:
 The function id appears only if the index is on return values of a
function that is defined over the columns of the table. (That is, if the
index is a functional index.) Here the function id is the same as the
procid value for the function in the sysprocedures table.
 The list of the columns (col1, ... , coln) in the second field identifies the
columns over which the index is defined.
 The operator class id shows the secondary access method that is used
to build and to search the index. Here the operator class id is the same
as the opclassid of the access method in the sysopclasses table.
__________________
rws
Reply With Quote
  #3 (permalink)  
Old 10-22-03, 12:03
Bob Elliot Bob Elliot is offline
Registered User
 
Join Date: Jan 2003
Posts: 6
Thanks - but I have already read the Guide.

What I couldn't see is how I can access the fields within indexkeys
directly.

I have since used sysindexes to do what I wanted to do (generate SQL for UPDATE STATISTICS).

Sysindexes is a view in Informix 9.3 (a table in 7.*).

Looking at this view we find the following method
ikeyextractcolno(x0.indexkeys ,0 )

This does not appear to be documented - and I guess sysindexes is (or will be) deprecated.

I wanted to know more.

Last edited by Bob Elliot; 10-24-03 at 03:09.
Reply With Quote
  #4 (permalink)  
Old 10-23-03, 14:24
Roelwe Roelwe is offline
Registered User
 
Join Date: Aug 2002
Location: Belgium
Posts: 534
Ok - sorry about that

Did you look into the http://iiug.org for any scripts?
__________________
rws
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