Postgresql Vacuum and Analyze, Maintenance and Performance

Published on:

I have been using Postgresql for a couple of years now and I am very happy with its performance and growth as a open source relational database. Today I will like to share with you how Vacuum and Analyze can help your database perform better.

VACUUM frees the disk space occupied by your database deletes and updates. When you delete or update a record in your table, it does not get removed and it remains until a VACUUM is done. For frequently-updated tables, VACUUM is highly recommended.

ANALYZE helps improve your queries by collecting statistics about the contents of tables in the database. The results of the analysis are stored in the pg_statistic system catalog. With these statistics, the query planner use it to determine the most efficient execution plans, thus improve the performance of your queries.

Read on →

Install Android USB Driver on Windows 8

Published on:

With a broken power button on my Nexus S running Jelly Bean, the only way I can do a screen capture for the app we are releasing to the play store is to use Dalvik Debug Monitor Server (DDMS) tool in the Android SDK.

In the latest Android SDK, Google deprecated DDMS and introduced a new tool call Monitor as a replacement. Enabling “USB Debugging” on my Nexus S, it fails to show up on the device list.

Read on →

Running Rbenv and Pythonbrew Side by Side

Published on:

Today, I went into a problem running pythonbrew after installing ruby using rbenv for setting up this blog last week. It took me awhile to figure out that rbenv was the problem. ~/.bashrc and ~/.profile were the only shell initialization files before rbenv came into the picture.

~/.profile
1
2
3
4
5
6
if [ -n "$BASH_VERSION" ]; then
    # include .bashrc if it exists
    if [ -f "$HOME/.bashrc" ]; then
        . "$HOME/.bashrc"
    fi
fi
Read on →