Optimize query: Model - Custom Find Method

File: ee/app/models/ai/duo_workflows/checkpoint.rb (Lines 36-42)

def self.find(*args)
  if args.length == 1 && !args[0].is_a?(Array)
    find_by_id(args[0])
  else
    super
  end
end

Generated SQL:

SELECT "p_duo_workflows_checkpoints".* 
FROM "p_duo_workflows_checkpoints" 
WHERE "p_duo_workflows_checkpoints"."id" = $1 
LIMIT 1

Optimization needed: Ensure query includes created_at filter for partition pruning.