A web development/programming blog providing info, tips, and tricks on programming languages, scripting, Linux, MySQL and more
Posts tagged Database
Improve the performance of the WordPress plugin Statpress (and your blog)
Jul 3rd
I haven’t hid my feelings about the poor performing StatPress plugin for WordPress. However, performance issues aside, I will say that the information this plugin provides is useful, and detailed. I’ve been running this plugin for 8 months now and have a good sized data set (125,000+ rows of data). While I myself have not experienced as many issues with this plugin as I have seen on other blogs, it is mainly because I am running my blog on a virtual dedicated server as opposed to shared hosting. I have seen smaller data sets than mine cause problems on shared hosting servers.
Read the rest of this entry »
Improve Your WordPress Blog’s Performance With this Database Hack
Jan 9th
**UPDATE**: After further research of the query below, I have found some additional information. The query was first introduced in WP 2.3 and is used for comment flood protection. I am currently running WP 2.9.1 and do not have the issue as the query has been modified and using a proper index to assist with the query speed. If you are using the latest version of WP, you won’t have this problem. I am still trying to find exactly when the query was changed so you all can know where you stand. However, I know that some people don’t upgrade their WP version due to changes they have made which upgrading will break. If you are on an older version of WP and have a large number of comments (tens to hundreds of thousands), this query will help improve your comment post times. If you are familiar enough with MySQL, look at the wp_comments table in your database. If there is an index on the `comment_date_gmt` column, you are ok. If not, read on, and run the query below as adding an index to the `comment_date_gmt` column won’t work as your query does not have that column in it’s WHERE clause.
One of daily responsibilities as a database administrator is maintaining the health of our shared hosting environment. In doing so, I deal with plenty of WordPress blogs daily. The one thing I have noticed is that many WordPress plugins are very poorly designed and can cause problems in a shared hosting environment. WordPress at it’s core though, is very well designed, although I have noticed some areas of possible improvement. As I come across common issues, I will post the fixes for them here for all to use.
Read the rest of this entry »
mysqldump: Got error: 2008: MySQL client run out of memory when retrieving data from server
Dec 7th
I came across this error today while at work. While trying to process a MySQL dump of a database of approximately 8 GB in size, I got the following error:
mysqldump: Got error: 2008: MySQL client run out of memory when retrieving data from server
This occurred on a MySQL 4.1 server. To get around this, you will need to use the -q switch as part of your mysqldump command.
This option is useful for dumping large tables. It forces mysqldump to retrieve rows for a table from the server a row at a time rather than retrieving the entire row set and buffering it in memory before writing it out.
(source: MySQL :: MySQL 3.23, 4.0, 4.1 Reference Manual :: 4.5.4 mysqldump ā A Database Backup Program)
Your full command should look something like this:
$ mysqldump -u user -p password -q database > outfile.sql
12 Quick and Easy MySQL Tricks
Dec 5th
In my first two months as a MySQL DBA, I have picked up a number of tips and tricks that have helped me in my daily job. In this post, I share them here with everyone. Hopefully they will help you as much as they have helped me.
Read the rest of this entry »
Avoid WordPress StatPress plugin like the plague!
Dec 2nd
** Update: I have released my first set of updates to the StatPress plugin. Check out the post for code to improve your blogs performance of StatPress
The WordPress plugin StatPress is an absolutely horrid plugin to use. Yes, I said it…horrid! After seeing many people praising this plugin on their sites, this is a bold statement.
Read the rest of this entry »

