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
Currently, the message expiration task loads all messages into memory and issues a separate delete for each expired message. We should use a single delete query instead--something like
delete from messages where created_at + interval '1 hour' * hours > now()
That query won't work for all sql flavors. One option here would be to restrict to postgres. If that's a problem, then we could store the expiration time in the messages table instead of the duration to get a portable query like
delete from messages where expires_at > now()
WDYT?
The text was updated successfully, but these errors were encountered:
Currently, the message expiration task loads all messages into memory and issues a separate delete for each expired message. We should use a single delete query instead--something like
That query won't work for all sql flavors. One option here would be to restrict to postgres. If that's a problem, then we could store the expiration time in the messages table instead of the duration to get a portable query like
WDYT?
The text was updated successfully, but these errors were encountered: