it seems that my server won’t use gin index.
- I’ve created a new database with one table.
- I’ve inserted one row as example.
- I’ve loaded trigram extension and created gin index using trigrams
- But when I check if the index works right I can see it doesn’t
- Any ideas?
SQL: http://pastebin.com/1yDQQA1Z
P.S. A day ago I’ve followed a tutorial about trigrams. Basically it was the same like my example above. The table had 2 columns, numeric(5, 0) and character varying (the one with gin trgm index). Query was with like operator using “%” and index was working (I could see Bitmap using in query explain), so I know, my server can use index (and its properly installed).
Thanks in advance.
Don’t test on one row, it is meaningless.
Here’s an excerpt of the documentation explaining why, in Examining Index Usage: