• dan@upvote.au
    link
    fedilink
    arrow-up
    3
    ·
    edit-2
    1 year ago

    Hopefully that swap is on an SSD, otherwise that query may not ever finish lol
    Once you’re deep into swap, things can get so slow that there’s no recovering from it.

  • Valen@lemmy.world
    link
    fedilink
    arrow-up
    2
    ·
    1 year ago

    You really need to index your tables. This has all the hallways of a Cartesian cross product.

    • frezik@midwest.social
      link
      fedilink
      arrow-up
      1
      ·
      1 year ago

      In a database course I took, the teacher told a story about a company that would take three days to insert a single order. Thing was, they were the sort of company that took in one or two orders every year. When it’s your whole revenue on the line, you want to make sure everything is correct. The relations in that database were checked to hell and back, and they didn’t care if it took a week.

      Though that would have been in the 90s, so it’d go a lot faster now.

        • Treczoks@feddit.uk
          link
          fedilink
          arrow-up
          1
          ·
          1 year ago

          We have a company like that here somewhere. When they have one job a year, they have to reduce hours, if they have two, they are doing OK, and if they have three, they have to work overtime like mad. Don’t ask me what they are selling, though. It is big, runs on tracks, and fixes roads.

  • tiredofsametab@kbin.run
    link
    fedilink
    arrow-up
    1
    ·
    3 months ago

    I don’t want to see the EXPLAIN for that query. This person really needs to learn more about sql, I’d wager.

  • UFO@programming.dev
    link
    fedilink
    arrow-up
    0
    ·
    1 year ago

    I dunno why I didn’t realize you can add more swap to a system while running. Nice trick for a dire emergency.

    • AggressivelyPassive@feddit.de
      link
      fedilink
      arrow-up
      0
      ·
      1 year ago

      Wrote my master thesis this way - didn’t have enough ram or knowledge, but plenty of time on the lab machine, so I let it do its thing over night.

      Sorry, lab machine ssd.

  • Faresh@lemmy.ml
    link
    fedilink
    English
    arrow-up
    0
    ·
    1 year ago

    Does the OOM killer actually work for anyone? In every linux system I’ve used, if I run out of memory, the system simply freezes.

    • Turun@feddit.de
      link
      fedilink
      arrow-up
      0
      ·
      1 year ago

      Yes. If you have swap the system will crawl to a halt before the process is killed though, SSDs are like a thousand times slower than RAM. Swapoff and allocate a ton of memory to see it in action.

      • sheogorath@lemmy.world
        link
        fedilink
        arrow-up
        0
        ·
        1 year ago

        Nvme PCIe 4 SSDs are quite fast now tho, you can get between DDR1 and DDR2 speeds from a modern SSDs. This is why Apple are using their SSDs as swap quite aggressively. I’m using a MacBook Pro with 16 GBs of RAM and my swap usage regularly goes past 20 GBs and I didn’t experience any slowdown during work.

        • Turun@feddit.de
          link
          fedilink
          arrow-up
          0
          ·
          1 year ago

          Depends if the allocated memory is actively used or not. Some apps do not require a large amount of random access memory, and are totally fine with a small part of random access memory and a large part of not so random access and not so often used memory.

          Alternatively I can imagine that MacOS simply has a damn good algorithm to determine what can be moved to swap and what cannot be moved to swap. They may also be using the SSD in SLC mode so that could contribute to the speedup as well.