List:Maria Storage Engine« Previous MessageNext Message »
From:Michael Widenius Date:October 31 2008 9:35pm
Subject:re: QC & Maria
View as plain text  
Hi!

>>>>> "sanja" == Oleksandr Byelkin <Oleksandr> writes:

<cut>

sanja> Taking into account that transactions can be read-only and transaction
sanja> can get advantage of QC before touching the table or if it do not touch
sanja> this particular table I propose for maria:
sanja> 1) Storing query in the cache
sanja>  - reject queries for tables changed in the current transaction (Monty
sanja> said that it is really easy to implement such flag)

yes;  I will implement this flag today.

sanja>  - store "version of the table" in QC (In our case it is TrID of the
sanja> last transaction changed table, It is int64 but used only 6 bytes, and
sanja> in query cache we have ulonglong for this purpose)
sanja> 2) Checking that query data is actual
sanja>  - reject queries for tables changed in the current transaction
sanja>  - reject queries if stored and actual TrID mismatch

You also have to reject query for a transaction where the current
trid < TrID-for-last-transaction-that-changed-the-table.

This is becasue if the trid is to small, we have to reject rows that
was added by another transactions after the current transaction started.

Regards,
Monty

Thread
QC & MariaOleksandr \"Sanja\" Byelkin5 Oct
  • Re: QC & MariaJonas Oreland6 Oct
  • Re: QC & MariaSergei Golubchik6 Oct
    • Re: QC & MariaOleksandr \"Sanja\" Byelkin6 Oct
      • Re: QC & MariaSergei Golubchik6 Oct
        • Re: QC & MariaOleksandr \"Sanja\" Byelkin6 Oct
  • re: QC & MariaMichael Widenius31 Oct