Max Key Size?

26,947 views
Skip to first unread message

bigethan

unread,
Feb 12, 2010, 1:27:52 PM2/12/10
to Redis DB
I've searched around but can't seem to find the answer (there's one
post where the only question not answered is the key length one :-)

So, anyone know the max key length that redis supports?

Thanks,
E

Salvatore Sanfilippo

unread,
Feb 13, 2010, 10:21:17 AM2/13/10
to redi...@googlegroups.com

Hello,

up to 2^31 bytes you are safe. So... in every practical terms, you an
use any kind of key.

Cheers,
Salvatore

--
Salvatore 'antirez' Sanfilippo
http://invece.org

"Once you have something that grows faster than education grows,
you’re always going to get a pop culture.", Alan Kay

Anentropic

unread,
Feb 5, 2014, 6:47:57 AM2/5/14
to redi...@googlegroups.com
Is that for the key alone, or key + value? I read that max size of string values specifically was 512MB, does this have any bearing on max size of the key itself, given that keys are strings?

Salvatore Sanfilippo

unread,
Feb 5, 2014, 6:57:19 AM2/5/14
to Redis DB
Max key size 512MB, max value size 512MB for strings. Max value size
for every element of aggregate data types 512MB.

Salvatore
> --
> You received this message because you are subscribed to the Google Groups
> "Redis DB" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to redis-db+u...@googlegroups.com.
>
> To post to this group, send email to redi...@googlegroups.com.
> Visit this group at http://groups.google.com/group/redis-db.
> For more options, visit https://groups.google.com/groups/opt_out.



--
Salvatore 'antirez' Sanfilippo
open source developer - GoPivotal
http://invece.org

To "attack a straw man" is to create the illusion of having refuted a
proposition by replacing it with a superficially similar yet
unequivalent proposition (the "straw man"), and to refute it
-- Wikipedia (Straw man page)

mayank....@news.co.uk

unread,
Apr 9, 2018, 9:23:02 AM4/9/18
to Redis DB
For set command what size of the string .


--

"Please consider the environment before printing this e-mail"


Newsworks - bringing advertisers and newsbrands together

www.newsworks.org.uk


This e-mail and any attachments are confidential, may be

legally privileged and are the property of News Corp UK & Ireland

Limited on whose systems they were generated. News Corp UK

& Ireland Limited is the holding company for the News UK group,

is registered in England & Wales under number 81701, has its

registered office at 1 London Bridge Street, London, SE1 9GF and

is registered with VAT number GB 243 8054 69. If you have received

this e-mail in error, please notify the sender immediately and do not

use, distribute, store or copy it in any way. Statements or opinions in

this e-mail or any attachment are those of the author and are not
necessarily agreed or authorised by News Corp UK & Ireland Limited

or any member of its group. News Corp UK & Ireland Limited may

monitor outgoing or incoming emails as permitted by law.  It accepts

no liability for viruses introduced by this e-mail or attachments. 

News Corp UK & Ireland Limited and its titles are committed to abiding by 
IPSO's regulations and the Editors' Code of Practice that IPSO enforces.

hva...@gmail.com

unread,
Apr 9, 2018, 12:38:41 PM4/9/18
to Redis DB
The SET command involves two strings:  the key name and the key value.  You replied to Salvatore's message, so you saw his quote of 512K bytes for the key name and 512K for the key value.  I don't believe these limits have changed in the past 4 years.

hva...@gmail.com

unread,
Apr 9, 2018, 1:13:54 PM4/9/18
to Redis DB
Sorry, I meant 512MB for name and for value, as Salvatore said, not 512KB.

zhaozha...@gmail.com

unread,
Apr 18, 2018, 11:25:43 AM4/18/18
to Redis DB
You can change the limit by using command "config set proto-max-bulk-len"

在 2018年4月10日星期二 UTC+8上午1:13:54,hva...@gmail.com写道:
Reply all
Reply to author
Forward
0 new messages