--- tickets-indexes

create index tickets_project_created_ix 
on tickets(project_id, created_at desc);

create index tickets_project_open_ix 
on tickets(
    project_id, 
    case when open = 1
        then open
    end,
    created_at desc
);
