I have a problem with a Pro*C query I\'m trying to optimise.
To explain, our application searches for rows in a huge database. These rows exist in several languages and
I have used a table before composed of an ID and a set of rows where the rows are the permutation of the possible values in the "in" list. Then I join to the table based on the ID and it gives me the results I need.
create table permute (
id number,
lang char(2)
);
create index permute_p1 on permute ( lang, id );
insert into permute ( id, lang ) values ( 1, 'en' );
insert into permute ( id, lang ) values ( 2, 'en' );
insert into permute ( id, lang ) values ( 2, 'fr' );
...
All you have to do then is pick the correct "ID" value 2, 3, 4 ... and put that into the join.