Missing Standard Index on Attachment causes queries filtered by CreatedDate to run slowly or time out
Last updated 2017-04-19 ·Reference W-2586229 ·Reported By 1 users
When running a query against the Attachment object and a selective filter is used on CreatedDate sometimes this will run slowly or time out.
This is due to a missing standard index on this field.
The following query should use an index on CreatedDate, but instead does a full scan of Attachment if the optimizer doesn't think that the index on SystemModStamp would also assist in selectivity.
WHERE CreatedDate >= 2014-01-01T00:00:00Z
AND CreatedDate < 2014-01-03T00:00:00Z
The only workaround at this time is to use a filter based on SystemModStamp.
Reported By (1)
Is it Fixed?
Any unreleased services, features, statuses, or dates referenced in this or other public statements are not currently available and may not be delivered on time or at all. Customers who purchase our services should make their purchase decisions based upon features that are currently available.