I was working months with my class, but now give me the following error:
"System.QueryException: Non-selective query against large object type (more than 100000 rows). Consider an indexed filter or contact salesforce.com about custom indexing. Even if a field is indexed a filter might still not be selective when: 1. The filter value includes null (for instance binding with a list that contains null) 2. Data skew exists whereby the number of matching rows is very large (for instance, filtering for a particular foreign key value that occurs many times)"
In this Line:
usuarios=[select id,PersonEmail,marca__c,
Marcas_de_las_que_quiere_recibir_ofertas__c,dni__c,
Segmento__c,Datos_Preferencias__c,
Datos_Test_Compatibilidad__c,Datos_Test_Big_Five__c,
Datos_CV_Obligatorio__c, datos_contratacion__c,
Fecha_orientacion_a_marca__c,Resultado_orientacion_a_marca__c,
Fecha_formacion_online__c,Resultado_formacion_online__c
from Account
where
Segmento__c in :setsegmentos
and Marca_relacional__c in: listaMarcas
and Baja__c=false and Ya_estoy_trabajando__c=false
and Back_list__c=false
and Inactivo__c=false limit 3000];
My SOQL just take 3000 records. Anyone can help me please?
I made some change for an advice fromm chri (thank you!), but still the same error.