Subject | Re: General performance questions |
---|---|
Author | Eric Handbury |
Post date | 2002-10-06T23:30:43Z |
--- In IBObjects@y..., "Thomas Steinmaurer" <ts@i...> wrote:
Could a SP like:
select COLPOS from SP_COUNTCOLUMNS(:TABLENAME);
where COLPOS is a (say) char(100) result-field whereby each
character represents the ordinal position of each column in that
table, and the value of each char in COLPOS is a '0' or '1'
representing whether that column is present in the table.
So the SP will be called for each table and return a Char field
whereby COLPOS[1] is the first column in the table and contains a
(say) 1 meaning a record was found, COLPOS[2] is the 2nd column and
contains a (say) 0 meaning a record was not found, etc. etc.
Like I said... just a stab in the dark! Eric.
> Hi,OPERATION, COLUMN_NAME)
>
> I'm looking for the best approach regarding speed vs. memory
> consumption for the following thing.
>
> I have a table storing metadata information, which looks like:
>
> CREATE TABLE IBLM$COLUMNLOGDEF (
> TABLE_NAME VARCHAR(31) NOT NULL,
> OPERATION VARCHAR(1) NOT NULL,
> COLUMN_NAME VARCHAR(31) NOT NULL,
> CONSTRAINT PK_IBLM$COLUMNLOGDEF PRIMARY KEY (TABLE_NAME,
> );Just taking a stab in the dark...
Could a SP like:
select COLPOS from SP_COUNTCOLUMNS(:TABLENAME);
where COLPOS is a (say) char(100) result-field whereby each
character represents the ordinal position of each column in that
table, and the value of each char in COLPOS is a '0' or '1'
representing whether that column is present in the table.
So the SP will be called for each table and return a Char field
whereby COLPOS[1] is the first column in the table and contains a
(say) 1 meaning a record was found, COLPOS[2] is the 2nd column and
contains a (say) 0 meaning a record was not found, etc. etc.
Like I said... just a stab in the dark! Eric.