Rails - an index for a query on three columns of a table
I have a query that I often use:
Site.where("mobile_visible = true AND (created_at > :date OR updated_at > :date)", :date => "12-04-30")
It creates this sql
SELECT `sites`.* FROM `sites` WHERE (mobile_visible = true AND (created_at > '12-04-30' OR updated_at > '12-04-30'))
I want to add an index or indexes to make this query more efficient. Should I add 3 indexes for 3 columns separately or 1 index indexing all three columns separately?
+3