by easy_rider · 12y ago · 0 comments
I have just made some crafty work in rails to make use of hstore datatypes in Rails. It stores an array of hashes, which I have not found a way to index the keys of yet.
Is this slow or fast for example? I'm doing a full-text search over all unnested (hstore) array values over a given column in a table wih 35k records.
development=# SELECT "leads".* FROM "leads" WHERE ( exists ( select * from (SELECT svals(unnest("address"))) x(item) where x.item LIKE '%mst%') );
Time: 57.257 msI'm used to MySQL, and this kind of query over unindexed records seems fast, but it also seems this might be slow for Postgres standards ?:/ Bear in mind.. no indices.
You may have to write a function that does what you want and Mark it as immutable.