• themaninblack@lemmy.world
      link
      fedilink
      arrow-up
      1
      ·
      edit-2
      1 minute ago

      I’m going to try. Could be:

      1. A long running UPDATE which means locking all of the data that is potentially being updated. Basically a lock is when the relevant data is frozen while the transaction executes. This can happen at the field or row or table level. The solution is to wait for completion, but your query could take 7 million years to complete so… you might not have the patience. This feels bad when you expected it to be a simple transaction or when you only expected the update to apply to a small subset of data… possible that you’re using a suboptimal query strategy (e.g. many JOINs, lack of indices) or that you’re running your UPDATE on a huge number of records.

      Or

      1. A deadlock, meaning the same data is being operated on at the same time, but the operations can’t execute because there is a competing/circular lock. The use of BEGIN means that the transaction has started. You usually use COMMIT to actually finish and complete the transaction. If you’ve got another query happening during this time, there can be “overlap” which makes it hang.

      Also see ACID compliance for further reading

  • marcos@lemmy.world
    link
    fedilink
    arrow-up
    11
    ·
    3 hours ago

    SQLite doesn’t do highly concurrent tasks. Your life will be much, much better if you don’t even try.

    It also doesn’t do Windows shared files, because any access into Windows shared files is highly concurrent on the speeds Windows is able to manage its shares.