You need to sign in to do that
Don't have an account?

Are Foreign Key Columns Automatically Indexed?
Question for an SFDC resource or other expert:
(1) Are master-detail foreign key columns automatically indexed?
(2) Are lookup foreign key columns automatically indexed?
In order to build "selective" queries that do not bump up against the infamous "Non-selective query against large object type (more than 100000 rows).... " you seem to need to create not only a good, tight where clause, but you must use indexed columns in the where clause. Thus my two questions above.
Thanks!
Dave
Even we too have the same issue........... and when we use lookup/master-detail fields in where clause, query works in a better way.
It would be great if salesforce moderators can confirm whether these fields are indexed or not.
DFC, As of my knowledge these fields are indexed.
Could a Salesforce resource please respond?
Thanks!
Dave