News for hackers. Stuff that matters.
Re:JSON Support in SQL Server 2016 by NDizzle on Monday May 18, 2015 @11:30PM (#9568016)
Leaving out JSON indexes seems like a tremendous oversight.
Re:JSON Support in SQL Server 2016 by viggity on Monday May 18, 2015 @11:54PM (#9568062)
if you really need indexes, extract the fields from your json and keep them as additional columns in the table. Key value stores have always had problematic indexing on anything that wasn't the key. RDBMS does indexing really well, lean on that side for what it is good for.
Re:JSON Support in SQL Server 2016 by est on Tuesday May 19, 2015 @01:54AM (#9568320)
> extract the fields from your json and keep them as additional columns in the table

You can do that only for simplest key-value json, not the more complicated ones IRL.

E.g. an array

ID, book_title, book_intro, book_tags

here book_tags is a json array. Now try index that!

Mongodb could index it, full text could index it, pg 9.4+ could, but not other RDBMS.

Support nested data structure in RDBMS is hard. You have to implement flat/unflat voodoo in a weird & lame, non-SQL DSL

Re:JSON Support in SQL Server 2016 by raphaelj on Tuesday May 19, 2015 @03:14AM (#9568497)
> here book_tags is a json array. Now try index that!

You just need to create a new table which links tags to books. That's how relational databases are normalized ...

Re:JSON Support in SQL Server 2016 by est on Tuesday May 19, 2015 @03:43AM (#9568575)
Expanding a billion row table into a hundreds of billions of rows table is not really a good idea

MongoDB handled this really well, create two index entries pointing to the same row.

Re:JSON Support in SQL Server 2016 by blumkvist on Tuesday May 19, 2015 @04:22AM (#9568683)
w00t? A billion attributes on hundreds of billions of rows? Could you think more of an edge case? You're just coming up with shit so you can show off how l33t you are. If you have that kind of a need, just go for a NoSQL server, nobody is stopping you. This feature is a nicety to have, not a replacement of NoSQL.
Re:JSON Support in SQL Server 2016 by ahachete on Tuesday May 19, 2015 @06:55AM (#9569099)
You could also do it in pg pre 9.4. Just create functional indexes on the paths you wanted to index. The advantage of 9.4 is special indexes for jsonb, which may index the whole field or just some paths. So even pg 9.2 was better than SQLServer's approach...
Re:JSON Support in SQL Server 2016 by rosser on Tuesday May 19, 2015 @12:11AM (#9568105)
Postgres perfectly supports indexing attributes within JSON fields, whether stored as the native JSON type, or using the hstore extension. I just created a couple of indexes on our DML audit logging archive table this afternoon, which stores old and new row state in hstore fields.
Re:JSON Support in SQL Server 2016 by mattmanser on Tuesday May 19, 2015 @06:11AM (#9568969)
"if you really need" = do loads of work you can't afford to do

"it just works!" = means you will actually use it

Your post is one of those that is both technically correct and practically useless.