Thanks for you reply Evgenij. My point is, this database is been used to do analysis, and the value are dynamically added . I only know the value's carnality wont be more than 300, but I do know the distinct values. I dump data into the db every day, the data is from customer. I am doing some aggregation on it. It will be good the db can compress the column by default but seems that is not the case.
Thank You On Thu, Feb 27, 2020 at 5:47 PM Evgenij Ryazanov <[email protected]> wrote: > Hello. > > It sounds like your database is not normalized properly. I suggest you to > read a some book about database design or at least some articles about > database normalization. > > For your specific use case you need to extract all possible values for > each such column into own table that has a column with integer primary key > and a column with a string value. In the main table these string columns > should be replaced with integer columns with foreign key references to the > new tables. This area is under responsibility of database engineers. > > -- > You received this message because you are subscribed to the Google Groups > "H2 Database" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/h2-database/368d26d8-8546-4b66-b5be-25c038de2fa6%40googlegroups.com > <https://groups.google.com/d/msgid/h2-database/368d26d8-8546-4b66-b5be-25c038de2fa6%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- You received this message because you are subscribed to the Google Groups "H2 Database" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/h2-database/CALGN0cKgqeT226ArNzwHeS6JDak6HbgU31BUV2QA8XrAptbS7Q%40mail.gmail.com.
