1.617.682.4508

Pythian Blog

The world discusses #Pythian on Twitter. Have a question? Use our hashtag and ask away.

Emergency

24x7 Support

Not a Pythian client but need help now? No problem. Click here.

Are you aware of an existing DBA opening or consulting requirement in your organization? Enter your email for a chance to win one year's access to Safari Books.

  

PBXT Transactional Characteristics

By: Keith Murphy

Let me first say that the PBXT storage engine has some great people behind it. At the users conference last April, I had a chance to meet Paul McCullagh, who created PBXT, and some of the people who work on it. They are dedicated individuals who are creating something unique.

Like the InnoDB storage engine, which is backed by the Innobase company, PBXT has a company that backs it, Primebase Technologies. This means that if needed, support can be got from the company that created the product. For enterprise companies this might be important.

The basics characteristics of PBXT:

  • MVCC: Multi-version concurrency control, enables reading without locking.
  • Transactional: Support for BEGIN, COMMIT and ROLLBACK and recovery on startup.
  • ACID compliant: Atomic, Consistent, Isolated, Durable (once committed, changes cannot be lost).
  • Row-level locking: updates use row-level locking, allowing for maximum concurrency.
  • Deadlock detection: immediate notification if client processes are deadlocked.
  • Referential Integrity: foreign-key support.
  • Write-once: PBXT avoids double-writes by using a log-based architecture.

Much of this is the same as for the other transactional storage engines, so I won’t spend time on them. What sets PBXT apart from other storage engines is the write-once characteristic. It is worth understanding.

In a traditional transactional storage engine, all data is written twice: once to a log file and then once to a database table. This is done to ensure two parts of the ACID equation, durability and atomicity. I discussed these traits previously so I won’t cover them here.

While PBXT is transactional, it writes only once, to a log. You can think of this log as the database table, as PBXT doesn’t keep table data in the tradition sense. This can seem very strange to someone used to working with MyISAM table files or InnoDB tablespace files, but it offers a number of benefits:

  • Less writing (duh!).
  • Since table data is never updated, rollback never has to undo a change (instantaneous rollback)
  • Since log files are written immediately, the records in the cache are never “dirty” (i.e. must be flushed before being freed).

These are only the highlights.

For systems with a large number of ongoing updates this approach is very beneficial. To those more interested in the inner workings of PBXT I would recommend Paul McCullagh’s PBXT whitepaper.

There are shortcomings (or potential ones) in PBXT. The main one is the lack of clustered indexes, the same issue that Falcon has. Another is that PBXT is fairly new. It hasn’t had extensive use in production environments. However, you should keep your eye on the PBXT engine, as it certainly looks like it has a bright future.

4 Responses

  1. Hi,

    “There are shortcomings (or potential ones) in PBXT. The main one is the lack of clustered indexes, the same issue that Falcon has.”

    Mm, I don’t agree, not fully at least. A clustered index has disadvantages too. It makes most sense if you have a clear access pattern you can exploit.

  2. Lukas says:

    “Referential Integrity: foreign-key support.”

    How is this implemented? The InnoDB implementation sort of works but when it comes to details it starts being flaky since its tacked on from the outside.

  3. Keith Murphy says:

    Roland,

    I did say “(or potential ones)”. Yes, a clustered index has disadvantages also.

  4. Hi Keith,

    Thanks for the very good write-up on PBXT. I have linked this blog from http://www.primebase.org. :)

    P.S. I have just release the Beta version!

Leave a Reply

Start NowWith Pythian - database design, management and emergency handling capabilities...

Pythian Blog

Connecting to Oracle with SQL Server 2005 x64
The quirks of connecting to Oracle from SQL 2005 64
more



Live Updates

pythian: Join us for a webinar June 4: Migrating to an Open Source DB Platform. Paul Vallee speaking. Register at
more



RSSTestimonials

  • Casey Dyke

    Database Team Manager Service Delivery and Applications , Telstra

    Pythian were recently engaged to take a lead role in a high end infrastructure build project at Telstra. Our requirements were a combination of... more