Re: Multiple entries in 1 field
From: Lyle H. Gray <lylefitzw_at_no.spam.gmail.com.invalid>
Date: Sun, 06 Oct 2019 13:36:34 -0500
Message-ID: <XnsAAE0949D8D314graynoibisspamcsumas_at_216.166.97.131>
>>
>> Using a list field like that would remove the possibility of placing
>> an index on the category (indexes can really speed up data
>> retrieval).
>>
>> -Lyle
Date: Sun, 06 Oct 2019 13:36:34 -0500
Message-ID: <XnsAAE0949D8D314graynoibisspamcsumas_at_216.166.97.131>
Luuk <luuk_at_invalid.lan> wrote in
news:5d9a19e1$0$10263$e4fe514c_at_news.xs4all.nl:
>>> How would a solution which uses json be better than a solution like: >>> - storing in category the value 'sci-fi, romance' >>> - doing a query SELECT ... FROM ... WHERE category LIKE '%sci-fi%';
>>
>> Using a list field like that would remove the possibility of placing
>> an index on the category (indexes can really speed up data
>> retrieval).
>>
>> -Lyle
> > Could a solution with values stored in json data type benefit from an > index? I never used the data type, but i do not think it can?
You are correct -- you wouldn't be able to take advantage of an index on a JSON column.
Lyle
>
Received on Sun Oct 06 2019 - 20:36:34 CEST