You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Or replace my question to "how to use rum index with rum_anyarray_addon_ops index?"
I have a table 'test_array', i want to index text array elements and order by another column. I created SQL as follows:
CREATE TABLE test_array (i text[],, score int8);
INSERT INTO test_array VALUES ('{}', 1), ('{0}',2), ('{1,2,3,4}',3), ('{1,2,3}',4), ('{1,2}',5),('{1}',6);
CREATE INDEX idx_array3 ON test_array USING rum (i rum_anyarray_addon_ops, score) with (attach='score', to='i');
explain select * from test_array where i && '{1,2}' order by score offset 1 limit 5;
When i have few data, the query plan is like this :
But after inserted with 1 million data, the query plan is like this:
The costs has no difference with gin index sorting, and they both have "Bitmap Heap Scan" ,it seams that the index not working or not properly used ?
The text was updated successfully, but these errors were encountered:
Or replace my question to "how to use rum index with rum_anyarray_addon_ops index?"
I have a table 'test_array', i want to index text array elements and order by another column. I created SQL as follows:
When i have few data, the query plan is like this :
But after inserted with 1 million data, the query plan is like this:
The costs has no difference with gin index sorting, and they both have "Bitmap Heap Scan" ,it seams that the index not working or not properly used ?
The text was updated successfully, but these errors were encountered: