Over the past few weeks, several US banks have pulled off from lending to Oracle for expanding its AI data centres, as per a report.

  • Tja@programming.dev
    link
    fedilink
    English
    arrow-up
    1
    ·
    3 days ago

    They are doing something wrong. Say what you want about their commercial strategy, the product itself is pretty good. It can definitely do pagination, and I hope they are not doing skip and limit.

    • Dremor@lemmy.world
      link
      fedilink
      English
      arrow-up
      3
      ·
      2 days ago

      Yeah, you can do pagination, but you need two request : one to select everything, the second to only return the results between id x and id y. Needless to say, the performances are far from ideal.

      But in recent version you do skip and take x, which is far easier to write. But my codebase date back to the 2000’s, and it uses the old ways.

      As an example, an SQL request to filter on an handful of parameters, and paginate, easily amount to 40-50 lines of SQL. And that’s the easy ones, because some request uses multiple view, in which case I wouldn’t be surprised to find a request doing more than 100 lines of SQL, maybe without even factoring the view in.

      • Tja@programming.dev
        link
        fedilink
        English
        arrow-up
        1
        ·
        2 days ago

        That’s some funky code, pagination is much easier than that, unless there’s something else going on.

        • Dremor@lemmy.world
          link
          fedilink
          English
          arrow-up
          1
          ·
          edit-2
          18 hours ago

          Probably, but I won’t touch that shit unless I have no way doing otherwise.

          Edit : As an example, I got an “add or update” stored procedure that start line 5, and ends line… 226.