Answer the question
In order to leave comments, you need to log in
How to understand what affects the speed of query execution with an array?
Good afternoon.
I have a table with 700,000 or more entries, one of the elements of which is an array of integers (int[])
create table users (uid serial primary key, username text, segments int[]);
insert into users (segments) values ('{0, 1, 3, 10, 5}')
etc. select * from users where segments @> '{9}' ;
select * from users where segments @> '{9, 10, 12}' ;
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question