My RoR app has a Vendor
class which has a related_software
and description
attribute. related_software
is stored into the postgresql database as an array.
I'm using the pg gem for searching the vendor class. The first problem was that the search query was incredibly slow. I thought this was due to lack of indexing, so I created a migration as follows:
add_index(:vendors, :related_software, :using => 'gin')
This, however, did not affect the load time at all. I am not strong with database tinkering, what am I doing wrong here?