Optimize query: Presenter - First Checkpoint

File: ee/app/presenters/ai/duo_workflows/workflow_presenter.rb (Line 28)

workflow.checkpoints.first

Generated SQL:

SELECT "p_duo_workflows_checkpoints".* 
FROM "p_duo_workflows_checkpoints" 
WHERE "p_duo_workflows_checkpoints"."workflow_id" = $1 
ORDER BY "p_duo_workflows_checkpoints"."id" ASC 
LIMIT 1

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