A while back I was developing a workflow scheduler. However the run duration kept coming back negative. The runs kept finishing like 15 seconds before they started. Eventually I figured out why; the company had configured a policy to use their custom NTP server, but it was 16.7 seconds off. So my Windows laptop’s time was in the future, but the WSL VM (which ran the program) used another NTP server and was correct. In the end I just added a bodge that made the program request the time from an external server on startup to calculate an offset.

  • bacon_pdp@lemmy.world
    link
    fedilink
    arrow-up
    0
    ·
    23 hours ago

    They did a 400 table join to return ‘true’ to test to see if they connected to the database; it took 48 minutes to run. Printed out, it took up 38 sheets of paper.

    I replaced it with a dozen sequence checks and individual select statements for each table; it took 3 seconds to run. And it could accurately identify which tables and columns are missing. Printed out, it fit on a single page.