I need to store large block of text into db table. Is there a way to compact it for storage and unpack before query?
Have you tried one of the compression extensions, e.g., [man]gzdeflate/man and then [man]gzinflate/man?
I have not tried anything yet. I know there are a few options but was not sure which would be the best option. And, is is a good idea to compact. Clearly I'll save some physical space but would gzinflate/gzdeflate slow me down in the end?
Testing is probably the only way to find out. Tests with small amounts of data seems to show that much of the time is spent in compression (and that holds true for [man]gzcompress/man and [man]gzuncompress/man as well), so the time/space trade off may work in your favour.
I'm looking at large blocks of text. I'll do without compression first and if I notice a drag I'll experiment with it.
Thanks for your advise -- as always it's right on the money!