4 ms·
One advantage is filtering query results at the DB layer. For example, you could compare elements within an array, test a particular index of the array, or see
by bdr 14y ago
One advantage is filtering query results at the DB layer. For example, you could compare elements within an array, test a particular index of the array, or see if a value is present anywhere in the array. See http://www.postgresql.org/docs/9.2/static/arrays.html http://www.postgresql.org/docs/9.2/static/arrays.html.
- ashray 14y agoThanks! On further thinking about my question I realized that anything at the DB layer (Postgres) will probably be faster than doing it in Python because it's written in C. (re: the json load and dump part of my question..)
- dagw 14y agoI don't know if the default json library in python is written C or not (never had a problem where json decoding was even close to a bottleneck), but there are at least a couple of very high performance json libraries for python written in C, so that shouldn't be much of a problem.
- the_cat_kittles 14y agothat is pretty cool. I'm sure there are many use cases for that, i just can't think of any off the top of my head.