You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Also I'm not sure if WHERE boolcolumn is going to be interpreted the same way as WHERE boolcolumn = TRUE, in terms of whether the partial index is used or not, but the latter syntax would be better for Serverpod partial indexes, because the Serverpod query syntax requires testing where: (t) => boolcolumn.equals(true).
Then the yaml syntax for the index would require the user to specify something like
(maybe a more comprehensive syntax could be provided to allow for inequalities etc., but simple equals / notEquals checks would satisfy my own needs for partial indices, at least)
Activity
vlidholt commentedon Mar 8, 2023
This should be added in the future. In the mean time, it's possible to manually add the index to your database using SQL.
lukehutch commentedon Apr 24, 2024
Also I'm not sure if
WHERE boolcolumnis going to be interpreted the same way asWHERE boolcolumn = TRUE, in terms of whether the partial index is used or not, but the latter syntax would be better for Serverpod partial indexes, because the Serverpod query syntax requires testingwhere: (t) => boolcolumn.equals(true).Then the yaml syntax for the index would require the user to specify something like
(maybe a more comprehensive syntax could be provided to allow for inequalities etc., but simple equals / notEquals checks would satisfy my own needs for partial indices, at least)
lukehutch commentedon Jul 11, 2024
The benefits of partial indices are quantified here:
https://stackoverflow.com/a/78725490/3950982
t-kietzmann commentedon Jun 12, 2026
Wanna push this again. Would be a great benefit, especially when working with soft-deletes.