In one embodiment, a method includes, capturing a query that is directed to a multi-tenant database, determining whether the captured query is a candidate for an additional filter, determining operators used by the captured query if the query is a candidate, determining data types of the database used by the captured query if the query is a candidate, determining whether there is a current filter