[Info-ingres] Store XML file

Roy Hann specially at processed.almost.meat
Fri Apr 22 08:48:08 UTC 2022


nikosv wrote:

> I have an XML file and want to store it in a table.Which data type
> should I choose?

Depending on the potential size of the file I'd choose VARCHAR if I
could be confident I could declare it big enough. A VARCHAR can be up to
32kb if your page size is sufficient. I'd modify the table WITH
COMPRESSION=(DATA).

If my files might be too big for an ordinary VARCHAR then I'd go for
LONG VARCHAR which has a 2Gb limit. They are not so convenient to use
though. You may end up having to deal with data handler routines and
they are harder to use in WHERE clauses.

Roy



More information about the Info-ingres mailing list