Login
You're viewing the ruby.social public feed.
  • Nov 21, 2026, 9:51 PM

    I wrote a simple query to find the `media_attachments` which are referencing accounts that no longer exist on our server. This took a long time, so I went to Home Depot to buy stuff I need for an IRL project.

    I got a text message to my phone about the chassis being too warm 😅 -- when I came back an hour later it hadn't finished.

    Then I rewrote the `IN` to be a `LEFT JOIN` and it ran in 9 seconds. Still got it.

    Some tables are bigger so I'll be carrying on this evening; just thought I'd share.

    💬 1🔄 1⭐ 0

Replies

  • Nov 22, 2026, 4:00 AM

    And we're done. High five to 2023's @insom -- working across the years to fix the data I fucked up.

    ```
    postgres=> select count(*) from pg_constraint where not convalidated;
    count
    -------
    0
    (1 row)
    ```

    💬 0🔄 0⭐ 0