I have a table in postgresql that contains an array which is updated constantly.
In my application i need to get the number of rows for which a specific parameter is
I think with Your current data model You are out of luck. Try to think of an algorithm that the database has to execute for Your query. There is no way it could work without sequential scanning of data.
Can You arrange the column so that it stores the inverse of data (so that the the query would be select count(id) from table where ARRAY[‘parameter value’] <@ table.array_column
) ? This query would use a gin/gist index.