mirror of
https://github.com/warmbly/warmbly.git
synced 2026-11-28 16:06:08 +00:00
7 lines
324 B
SQL
7 lines
324 B
SQL
CREATE INDEX CONCURRENTLY IF NOT EXISTS idx_tasks_dispatch_usage
|
|
ON public.tasks (email_account_id, COALESCE(completed_at, updated_at) DESC NULLS LAST)
|
|
INCLUDE (id, task_type)
|
|
WHERE status IN ('active', 'completed')
|
|
AND task_type IN ('warmup', 'campaign', 'email', 'placement')
|
|
AND message_id <> '';
|