Showing posts with label mysql. Show all posts
Showing posts with label mysql. Show all posts

PHP MySQL incremental backup/restore implementation (script download)

I have published two small scripts that allows to create and restore data from mysql database filtered by date, so I can define this as incremental backup. Article describes the backup/restore scripts configuration. The scripts themselves can be downloaded from the GitHub, links are available at the end of the article.

Read complete article: PHP MySQL incremental backup/restore implementation (download the script)

Using MySQL PHP: select random row based on weight

Article describes algorithm of random row selection based on weight, so some rows will be selected more often than other. Article includes sample codes, so I hope will bу helpful to somebody.
Do not hesitate to leave comments if you have ideas how to improve the algorithm.

Using MySQL: select random row, but fast

Random rows selection may be slow and there are several commonly used solutions to solve this problm could be googled. In my article I am trying to review a few algorithms and to describe benefits and limitations of them.
Let me know if I have missed some good algorithm.

Using MySQL: ways to improve speed

As I have mentioned in one of my previous articles I am slightly disappointed in MySQL prepared statements, so I decided to look to theold and proven ways to improve the speed of the MySQL interaction. But what is even more impressive this approach allows even reduce hardware utilization.
This article describes SQL only and does not include PHP or erlang implementations, I hope publish some code soon.

Read complete article: Using MySQL: ways to improve speed

PHP MySQL prepared statement vs SQL statement

I should confess - I am already using MySQL prepared statements for some time, but very rarely and mainly because they can make certain scripts more readable. As many of us I have read a lot of articles about coolness of prepared statements and that I should use them because of security and speed improvements. Finally my сuriosity won and I decided to test prepared statements against ordinary SQL statements myself. Friendly speaking I was impressed by the results I got....

Read complete article: PHP MySQL prepared statement vs SQL statement

Scaling MySQL database with partitioning & subpartitioning

Many of us sooner or later have to scale our web applications. When we are talking about scalability we are always talking about the data and data storage. There are many options for data storage nowdays as relational databases, key-value storages and document oriented storages , but great part of web applications are using MySQL relational database as the main data storage maibly because of its flexebility. This article describes one of the MySQL scaling approaches - partitioning.

Read complete article: Scaling MySQL database with partitioning & subpartitioning

MySQL master-slave and master-master replication

Simple step by step instructions for MySQL master-slave and master-master replication setup with some security conciderations. This article was written to reflect some changes that took place in the latest versions of MySQL database server.

Read complete article: MySQL master-slave and master-master replication. Setup instructions.