What is the maximum length for a metafield's value?

912 views
Skip to first unread message

Travis

unread,
Jan 12, 2012, 10:17:59 PM1/12/12
to shopify-api
In the API the it says, "The namespace has a maximum of 20 characters,
and the key has a maximum of 30 characters." But there's no mention of
any limit on the value. Is it safe to assume that there is no limit?

Dave

unread,
Jan 12, 2012, 10:45:02 PM1/12/12
to shopify-api
I store pretty big strings and have yet to run into problems. Common
sense prevails. Since JSON is a string, you can serialize with
metafields pretty well.

Edward Ocampo-Gooding

unread,
Jan 12, 2012, 11:03:21 PM1/12/12
to shopi...@googlegroups.com
The current implementation of a metafield value field is a MySQL TEXT column. According to my lame Googling, a TEXT column has a maximum length of 65535 (2^16 - 1) characters.

I’m not encouraging you to start storing enormous blobs, but the limit is pretty big.


On Thursday, 12 January, 2012 at 10:45 PM, Dave wrote:

> I store pretty big strings and have yet to run into problems. Common
> sense prevails. Since JSON is a string, you can serialize with
> metafields pretty well.
>

Dave

unread,
Jan 13, 2012, 9:08:16 AM1/13/12
to shopify-api
Whoa! Cats outta da bag... Shopify is built on MySQL... ooolala...

Edward Ocampo-Gooding

unread,
Jan 13, 2012, 9:16:13 AM1/13/12
to shopi...@googlegroups.com
Yep. Those db servers sit on some of the biggest and fastest SSDs out
there and scream along pretty quickly. There’s a lot of memcached and
redis to accompany.

Vertica is used for our own data warehouse.

Most hardware is in a Server Central colo in Chicago but has failovers
in other physical locations.

Travis Haynes

unread,
Jan 13, 2012, 10:51:56 AM1/13/12
to shopi...@googlegroups.com
Thanks. For my purposes that is pretty much unlimited.
Reply all
Reply to author
Forward
0 new messages