Say I have the following table
CREATE TABLE IF NOT EXISTS "PROPS" (
"O_TYPE_ID" UUID NOT NULL,
"O_ID" UUID NOT NULL,
"R_TYPE_ID" UUID NOT NULL,
"NAME" VARCHAR NOT NULL,
"VALUE" VARCHAR,
CONSTRAINT PK_PROPS PRIMARY KEY ("O_ID", "R_TYPE_ID", "NAME")
);
Now I have a list of lists which is the list I want to use to query Postgres. Meaning I have a list of
List((O_ID.type, NAME.type))
I want to list all the records which have the combination of these two types, a single list I could use the IN operator, how can I query for list os list values in the above case? A naive implementation would be to do a where with two equal clause and the and operator, but in my case if the list is too huge that would mean too much IO, how do you handle the scenario to handle the list of lists in a very optimized way without too much IO. Using 9.4+ Postgres.