Showing entries 1 to 2
Displaying posts with tag: limitations (reset)
Avoiding Deadlocks in Galera - Set up HAProxy for single-node writes and multi-node reads

September 17, 2013 By Severalnines

Galera cluster has known limitations, one of them is that it uses cluster-wide optimistic locking. This may cause some transactions to rollback. With an increasing number of writeable masters, the transaction rollback rate may increase, especially if there is write contention on the same dataset. It is of course possible to retry the transaction and perhaps it will COMMIT in the retries, but this will add to the transaction latency. However, some designs are deadlock prone, e.g sequence tables. In this blog we present how you can minimize the risk for deadlocks due to the design of Galera. 

 

Test Case

 

Here is a simple test case. We have a table that contains a column and a row that hold a number and is regularly updated to provide …

[Read more]
Getting around optimizer limitations with an IN() list

There was a discussion on LinkedIn one month ago that caught my eye:

Database search by "within x number of miles" radius?

Anyone out there created a zipcode database and created a "search within x numer of miles" function ?
Thankful for any tips you can throw my way..

J

A few people commented that some solutions wouldn't scale. To understand why these sorts of geographic search queries are problematic in MySQL, it's best to show some execution plans on dummy data:

PLAIN TEXT SQL:

  1. EXPLAIN …
[Read more]
Showing entries 1 to 2