Databases · Middle · Question 9 of 75

Which index type fits searching inside a jsonb column, like WHERE data @> '{"tags": ["sale"]}'?

Explanation

GIN indexes the keys and elements inside a value. It's also used for arrays and full-text search. BRIN suits huge tables whose values follow physical order, like timestamps in logs.

Further reading

Problem with a question

Databases · Middle · question 9

Test yourself

Take the Databases · Middle quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz