I came across this blog post with a nice pattern for auto-increment in MongoDB. It’s a great post, but there is something to think about beyond how to logically perform the operation; performance. The idea presented in the blog is to utilize the MongoDB findAndModify command to pluck sequences from the DB using the atomic… Read more »
Posts Categorized: Python
mongo_graph: a rrdtool graphing utility for MongoDB
I just uploaded a little utility that pulls performance data from MongoDB and loads it into rrdtool for trending and analysis. Sure there are options like cacti out there, but this is just a simple raw utility vs something designed for a larger environment. Simple. Feedback would be awesome. http://github.com/kgorman/mongo_graph
mongostat 0.2b
I have been playing quite a bit with MongoDB lately. MongoDB is a nosql type database. It’s different than a simple k/v store however. It allows sorting, secondary indexes and such. It’s format is BSON a binary representation of JSON with some additions. Anyway.. Wow what a mind bender working in the ‘schema-less’ nosql type… Read more »
pgstat 0.8beta released on PgFoundry
I moved the pgstat (previously named pgd) project to pgfoundry. Thank you to the folks over there approving the project. I added a column for ‘active’ processes from pg_stat_activity as well as some fixes requested by Devrim that I really should have had done from the start. Thanks for the contribution. Downloads can be found… Read more »
Cluster data, save cash
Since the economy is not exactly rocking these days, I suspect there are a lot of companies out there trying to save a buck or two on infrastructure. Databases are not exactly cheap, so anything that an engineer or DBA can do to save cycles is a win. So how do you stretch your existing… Read more »
Python/cx_Oracle utility functions
I recently created some utility functions to startup, mount and stop Oracle via cx_Oracle and thought I would share them. You will want to make sure you have password files setup correctly in order for this stuff to work. # shutdown abort: def shutdown_abort(sid): try: os.environ[’TWO_TASK’]=sid handle=cx_Oracle.connect("sys", "yourpwd", sid, cx_Oracle.SYSDBA) handle.shutdown(mode = cx_Oracle.DBSHUTDOWN_ABORT) return 0… Read more »
Python and cx_oracle
I decided to start futzing with Python and Oracle. I generally use perl for most everything, and sometimes php for web based things, but I wanted to try Python at the urging of colleagues. I downloaded the source from here, and added in cx_Oracle from here . The installation on linux was about as smooth as possible. I installed… Read more »

Recent Comments