Skip to content

Commit

Permalink
Revert "⚡️ Forsøk med en join i update for å gjøre spørringen raskere"
Browse files Browse the repository at this point in the history
This reverts commit bf4dcb5.
  • Loading branch information
chsko committed May 3, 2024
1 parent e78f978 commit 705715b
Showing 1 changed file with 2 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,8 @@ internal class TreDao(private val dataSource: DataSource) {
val query = """
UPDATE sti
SET ugyldig = now()
FROM (
SELECT key FROM node WHERE id = :id AND id_type = :node_type
) AS keys
WHERE forelder = keys.key OR
barn = keys.key
WHERE forelder = (SELECT key FROM node WHERE id = :id AND id_type = :node_type) OR
barn = (SELECT key FROM node WHERE id = :id AND id_type = :node_type)
"""

sessionOf(dataSource).use {
Expand Down

0 comments on commit 705715b

Please sign in to comment.