Subject Max key size?
Author Kjell Rilbe
Please remind me, what is the max key size in FIrebird 1.5?

I just failed to create a compound index on these two columns:
- int
- varchar(200)

What I actually need is to make the following queries as fast as possible:

UPDATE "Master"
SET "Info" = :Caption
WHERE "Code" = :Code;

UPDATE "Master" M
SET "Info" = "Info" || '; ' || :Caption
WHERE EXISTS (
SELECT 1
FROM "Detail" D
WHERE D."Id" = M."Id"
AND D."Code" = :Code
)
AND M."Info" IS NOT NULL;

UPDATE "Master" M
SET "Info" = :Caption
WHERE EXISTS (
SELECT 1
FROM "Detail" D
WHERE D."Id" = M."Id"
AND D."Code" = :Code
)
AND M."Info" IS NULL;

"Master" ("Id") is primary key.

"Detail" ("Id", "Code") should be primary key but I just noticed that it
isn't.

"Detail" ("Code", "Id") has a non-unique ascending index (selectivity
0.002433).

"Detail" contains up to about five record for each "Master".

Thanks,
Kjell
--
--------------------------------------
Kjell Rilbe
Adressmarknaden AM AB
E-post: kjell.rilbe@...
Telefon: 08-761 06 55
Mobil: 0733-44 24 64