Home » SQL & PL/SQL » SQL & PL/SQL » String Compress (11G)
String Compress [message #634070] Tue, 03 March 2015 16:05 Go to next message
Yuvraaj
Messages: 122
Registered: January 2011
Location: California, USA
Senior Member
Hi All,

Is there a way to compress the incoming string and store in a column? i.e My table column size is varchar2(10). If i get a string of size 20 I have to compress and store, up on retrieval I should get original string.

Thanks
Re: String Compress [message #634073 is a reply to message #634070] Tue, 03 March 2015 22:22 Go to previous messageGo to next message
Asfakul
Messages: 43
Registered: July 2014
Member
Here is a good article you can look into.

https://docs.oracle.com/cd/E17952_01/refman-5.1-en/encryption-functions.html
Re: String Compress [message #634074 is a reply to message #634073] Tue, 03 March 2015 23:10 Go to previous messageGo to next message
Lalit Kumar B
Messages: 3174
Registered: May 2013
Location: World Wide on the Web
Senior Member
Asfakul wrote on Wed, 04 March 2015 09:52
Here is a good article you can look into.

https://docs.oracle.com/cd/E17952_01/refman-5.1-en/encryption-functions.html


That link points to MySQL 5.1 Reference Manual. You would need to search here.

[Updated on: Tue, 03 March 2015 23:12]

Report message to a moderator

Re: String Compress [message #634077 is a reply to message #634074] Wed, 04 March 2015 00:47 Go to previous messageGo to next message
Michel Cadot
Messages: 68648
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator

Why search in 12c documentation when you have a 11g database?

Re: String Compress [message #634079 is a reply to message #634077] Wed, 04 March 2015 01:25 Go to previous messageGo to next message
Lalit Kumar B
Messages: 3174
Registered: May 2013
Location: World Wide on the Web
Senior Member
Hmm, I didn't notice OP mentioned 11g. Anyway, my intention was to point to the Oracle database documentation as the post had a link to MySQL.
Re: String Compress [message #634080 is a reply to message #634070] Wed, 04 March 2015 01:39 Go to previous messageGo to next message
Littlefoot
Messages: 21809
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Yuvraaj wrote on Tue, 03 March 2015 23:05
Hi All,

Is there a way to compress the incoming string and store in a column? i.e My table column size is varchar2(10). If i get a string of size 20 I have to compress and store, up on retrieval I should get original string.

Thanks

Why don't you simply alter table and enlarge column's size?

Or, use smaller font to preserve some space.
Re: String Compress [message #634081 is a reply to message #634079] Wed, 04 March 2015 01:40 Go to previous messageGo to next message
Michel Cadot
Messages: 68648
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator

And mine was to, anyway, point to the trend of your current posts. Smile

Re: String Compress [message #634105 is a reply to message #634081] Wed, 04 March 2015 08:22 Go to previous messageGo to next message
Bill B
Messages: 1971
Registered: December 2004
Senior Member
I agree. With the cheap price for storage these days, why would you not increase the column width and if you want to save space and have the Oracle 11 enterprise edition simply compress the table.
Re: String Compress [message #634108 is a reply to message #634081] Wed, 04 March 2015 09:01 Go to previous messageGo to next message
gazzag
Messages: 1118
Registered: November 2010
Location: Bedwas, UK
Senior Member
Oracle always points to the latest release Wink
Re: String Compress [message #634560 is a reply to message #634108] Wed, 11 March 2015 05:59 Go to previous messageGo to next message
msol25
Messages: 396
Registered: June 2011
Senior Member
Compress at table level,you can use like below:


create table test compress for query high as
  select  *
  from    source_table


[Updated on: Wed, 11 March 2015 06:00]

Report message to a moderator

Re: String Compress [message #634570 is a reply to message #634560] Wed, 11 March 2015 07:23 Go to previous messageGo to next message
Solomon Yakobson
Messages: 3273
Registered: January 2010
Location: Connecticut, USA
Senior Member
I didn't see any mentioning OP is on exadata or is using filesystem supporting Oracle Hybrid Columnar Compression.

SY.
Re: String Compress [message #634571 is a reply to message #634570] Wed, 11 March 2015 07:26 Go to previous message
gazzag
Messages: 1118
Registered: November 2010
Location: Bedwas, UK
Senior Member
Thank you. I had no idea what he was on about Smile
Previous Topic: cursor and loop
Next Topic: NO COPY parameters
Goto Forum:
  


Current Time: Thu May 09 23:09:34 CDT 2024