We're looking to track where certain records were created (e.g. from a User within Salesforce, from our website etc...). We're wondering what is the best and least CPU intensive way of querying these records as this could be an object with a large amount of records.
We're considering two options: checkboxes (ticked if created from Salesforce, another ticked if created from the website) or a picklist. Picklist seems to make the most sense given the record could only ever be created from location but we don't want to rule out checkboxes either if it helps performance.
We're expecting that it's more CPU intensive to compare a Strings then looking for true or false (e.g.
SELECT Id FROM Object__c WHERE Created_Salesforce = true vs.
SELECT Id FROM Object__c WHERE Location_Created__c= 'Salesforce'). But it may be more CPU intensive to find the specific checkbox in a query.
Is querying checkboxes more efficient or is querying picklists more efficient?
How might we find out which method yields better performance?