Related Entries

Quick Ref: SVN command line
Git with Dropbox
Cisco's new urbanism
Portable development links
Wish I had this 10 years ago

« Useless Python: deltadate
» Focusing on value

Really beginning to like SQLite

Faster than a speeding bullet. Is it SQLServer? No it is SQLite!

Last week, I got a moment to look into SQLite and Python. I did not really use SQLite for anything useful then. However, I was really impressed with its command line client.

Today, I thought I'll see how it works when the data is large. I use a simple system to log site hits. The log file for this month had grown pretty big due to the bandwidth abuse.

Well, I use awstats and analog for log analysis. Both are fine. But, sometimes, I like to go and look for detailed information.

I wrote a small python script to parse my Apache log files and output pipe-separated records. After that, it is really one command to upload the data into a pre-created table in SQLite

Once it is in SQLite, it is a simple matter of running SQL queries to find the information I need. Here's a sample packaged report I use.

If sqlite command line client has command history support, this would be perfect.

But, I am still blown away by the speed. Even LIKE queries are very fast.

If you are interested, you can browse CVS for my little scripts.

No pun intended, but the inspiration behind this was a raging snowstorm and Miller Lite.

  1. yeah, it's really cool
    i'm using sqlite with wxpython, a perfect combination... ;)

    Posted by: james on April 29, 2003 06:10 AM