Why MySQL indices are so important? At Vevida, we like to help our customers as much as possible. Even with optimizing a MySQL database when they don’t ask for it, or when a customer doesn’t know performance can be improved. For example by adding an index because we spotted a slow query in our slow-query log.
Convert MyISAM tables to InnoDB. In the earlier days of MySQL, the default storage engine for your database was MyISAM. This is also why you still encounter a lot of examples with
engine=MyISAM online. Nowadays, the default storage engine is InnoDB, and MyISAM is no longer actively developed. Therefore, all MySQL performance optimizations are for InnoDB, and it’s recommended to switch to this as your table storage engine.
How to flush MySQL Continue reading
query_cache to prevent fragmentation of free query cache memory space? Here is a how to for unattended and automatically clearing MySQL’s query cache using a Linux cronjob. And I’ll show you how to on the
Simple MySQL connection test from your website with ASP.NET, PHP & classic ASP. Whenever you need a MySQL connectivity test from a website or server, it’s handy to have various test scripts nearby. Whether it is because you are setting up a new website or you have just installed a new server and are running your tests. Continue reading
Learn how to optimize WordPress’
wp_options table for faster database results. This probably isn’t a big issue, but today I noticed a slow MySQL query coming from a WordPress database (WordPress wp_options table). This made me investigate and to optimize the WordPress wp_options table “autoload” feature. The autoload feature loads and caches all autoloaded options, if available, or all options. The default option is to autoload, and over time when the
wp_options table grows, this degrades performance.
How to use mysqlcheck when your MySQL table gets corrupted. Check & repair tables with MySQL’s mysqlcheck, a command line table maintenance program. Mysqlcheck checks, repairs, optimizes, or analyzes MySQL tables. In this post I’ll show you how to use Continue reading
mysqlcheck to optimize all MySQL tables using a cronjob.
The WordPress plugin StatPress (no longer available in the Plugin Directory) is still widely used and still is very slow. Here are some MySQL statements you can use to optimize its performance, as a WordPress optimization tip…
MySQL string comparison functions for MD5 and SHA1 hashes; how to calculate MD5 and SHA1 hashes in MySQL and compare strings with MySQL. Some web scripting languages like ASP don’t have native string hashing functions -like MD5 or SHA1. This makes it quite difficult to hash or encrypt user supplied input, and to perform string comparison to compare hashes. Let’s make MySQL do the string comparison and hash calculations for us! Continue reading
The PHP MySQLi extension supports multiple queries, which are concatenated by a semicolon, with Continue reading
mysqli->multi_query. We use this to optimize all MySQL tables, in a single multi-query statement. Neat! Optimizing MySQL tables is important to keep tables small and fast. This boosts MySQL, PHP and website performance and we all love that, don’t we? 🙂
How to clean up WordPress spam comments and meta data with phpMyAdmin. A lot of WordPress spam comments and meta data will keep your WordPress database huge, and slows down your site. It’s best to delete spam comments regularly, but if you’re facing hundreds of thousands spam comments, here is how to delete them all in bulk
The less spammers hit your WordPress blog, the better your blog performs, is one of my opinions. A second is, the less unnecessary plugins you use on your WordPress blog, the better. So, a little while ago I decided to remove plugins like Stop Spammer Registration Plugin and do its work myself. Here is why & how: Continue reading
How to reset a lost WordPress password: If you’ve lost or forgotten your WordPress admin password, you can easily reset the password. Either use the following MySQL statement to reset your WordPress admin password, or change it through
Connect to SQL Server Compacy (SqlCe) database with ASP. Here is how to install the
Microsoft.SQLSERVER.CE.OLEDB.4.0 Provider and use classic ASP to connect to an SqlCe (SQL Server Compact) database sdf file, as a Microsoft Access database replacement. For Windows Server IIS. SQL Server Compact (SqlCe), the embedded database engine, is the default database for Visual Studio 2010 SP1 and WebMatrix 3. This means, it’s recommended to use SqlCe over Access nowadays.
Umbraco 6.0.2 fails when using MySQL, because Umbraco has changed their database layer/logic, breaking MySQL support. Because SqlCe is deprecated by Microsoft it is best to use SQL Server instead as your Umbraco database back-end. Continue reading
In November 2011, I wrote a post about MySQL query caching with PHP/Zend_Cache, and I recently stumbled upon a blog post caching MySQL query results in memcached by “KutuKupret”. This made me wonder if the same would be easily done with the Windows Cache Extension for PHP. Continue reading