What's the difference between using ARRAY[] and '{}'::int[] when it comes to performance? Is one of them better than the other?
I'm using functions which contains queries that use conditions like:
AND ('{13,57,30,59}'::int[] && _user_profiles)
where is necessary to compare an array (_user_profiles in the example) against a static array ('{13,57,30,59}'::int[]).
This way to compare replies in almost every one of these queries. So what would be better to use?
AND ('{13,57,30,59}'::int[] && _user_profiles)
(OR)
AND (ARRAY[13,57,30,59] && _user_profiles)
explain (analyze) select '{13,57,30,59}'::int[] from generate_series(1,10e6)andexplain (analyze) select ARRAY[13,57,30,59] from generate_series(1,10e6)