View Full Version : Python or C++ for database backend?

Aug 28, 2010, 07:13 PM
I got asked to write a crossplatform app for work (and I refuse to use Mono) which needs to interact with out Postgere SQL database. I'm not really comfortable with C++ yet so how does Python perform under heavy loads?

Aug 28, 2010, 07:50 PM
You are missing a lot of the details we would need to help you out:

- By application do you mean something with a GUI, or a more server based process? Python is not very cross-platform when it comes to GUIs.

- What do you mean by heavy loads, and how much optimization are you going to be putting into this?

C++ is going to be the better choice if you are going to be doing a lot of really intense computation and are willing to spend the time wringing all of optimizations possible out of the problem, whereas Python is going to get you to a working version much faster but is going to carry some speed penalty unless you start to put compiled modules in (C/C++). If most of your heavy lifting is actually going to happen inside your SQL queries (a common thing with database apps), the your choice of language is not going to have much of an effect (unless you hit pathological cases).

And your phrase "database backend" probably is not the one you want. That would usually refer to PostreSQL in this case.