Love Fuel?    Donate

FuelPHP Forums

Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
DB transaction and concurrent update
  • Hello,
    I've been learning to build an Web application with FuelPHP and Mysql these days and jump into one problem.
    I want to use a DB::transaction to update many rows from many tables (so it may take long time to finish). When many users are logging in and perform the same task at the same time, is each transaction in the queue and perform in sequence? or many transaction can happen at the same time?
    If I want to perform only one transaction for only one user at one time (and perform the next one in queue after finish the previous ones), how can i do that? Is SQL table locking or row locking be the solution?

    so sorry for my stupid English....
  • HarroHarro
    Accepted Answer
    The way transactions behave, and which queries cause what kind of locking, is different for each RDBMS, and sometimes even between versions of the same RDBMS. Some for example do page locking instead of row locking (which depending on the size of a row might be a lot of rows).

    The only way to know the behaviour of the RDBMS you use is to consult it's documenation.
  • Hi Harro,
    Thanks so much for taking time to answer my question.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion