Skip to content

Commit

Permalink
🗃️ Partial index på totrinnsvurdering-tabellen
Browse files Browse the repository at this point in the history
* Caster også tidspunkt til dato og filtrer for kun oppgaver som
har blitt oppdatert i dag
  • Loading branch information
chsko committed Mar 20, 2024
1 parent cd41482 commit 3361740
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
CREATE INDEX ON totrinnsvurdering(vedtaksperiode_id) WHERE utbetaling_id_ref IS NOT NULL;
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ class OppgaveDao(dataSource: DataSource) : HelseDao(dataSource), OppgaveReposito
ORDER BY vedtaksperiode_id, totrinnsvurdering.id DESC
) ttv ON ttv.vedtaksperiode_id = v.vedtaksperiode_id AND ttv.utbetaling_id = o.utbetaling_id
WHERE (ttv.saksbehandler = :oid OR o.ferdigstilt_av_oid = :oid) AND (o.status in ('Ferdigstilt', 'AvventerSystem'))
AND o.oppdatert >= :fom
AND o.oppdatert::date = :fom::date
ORDER BY o.oppdatert
OFFSET :offset
LIMIT :limit;
Expand Down

0 comments on commit 3361740

Please sign in to comment.