By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
445,813 Members | 1,236 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 445,813 IT Pros & Developers. It's quick & easy.

Question of speed - Flat file DBMS

P: n/a
Hi

I have to implement a flat file dbms. The basic condition is that
relations will be given in files and i will have to run certain select
project join queries on those relations.

Can someone tell me as to which language will be faster, python or C++??

Aprameya

Jul 18 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a

I.V. Aprameya Rao wrote:
Hi

I have to implement a flat file dbms. The basic condition is that
relations will be given in files and i will have to run certain select project join queries on those relations.

Can someone tell me as to which language will be faster, python or

C++??

Faster to get a working app released: Python

Faster to drive you nuts: C++

Faster processing the files: My hunch is C++, but not by much. After
you've shipped your working app (in Python), you'll still have lots of
spare time to tweak up the speed -- IF it's slow, if anybody notices,
and if anybody cares -- and this newsgroup usually provides a lively
response to "how do I make this faster" questions.

Jul 18 '05 #2

P: n/a
In message <ma***************************************@python. org>, I.V.
Aprameya Rao <ap******@students.iiit.net> writes
OK, i forgot to mention this.

The speed is a critical issue because there will be a competition and
whosever solution is faster wins the prize.

Hence will a python solution be as fast as a C++ solution??

aprameya

On 4 Mar 2005, John Machin wrote:

I.V. Aprameya Rao wrote:
> Hi
>
> I have to implement a flat file dbms. The basic condition is that
> relations will be given in files and i will have to run certain

select
> project join queries on those relations.
>
> Can someone tell me as to which language will be faster, python or

C++??

Faster to get a working app released: Python

Faster to drive you nuts: C++

Faster processing the files: My hunch is C++, but not by much. After
you've shipped your working app (in Python), you'll still have lots of
spare time to tweak up the speed -- IF it's slow, if anybody notices,
and if anybody cares -- and this newsgroup usually provides a lively
response to "how do I make this faster" questions.


The key to speed is disk caching. Unless you're doing a profound amount
of computation on your data, I doubt there'll be any significant
difference between using Python or C++, except due to how much disk i/o
is done by the different programs and language environments.

So cache as much as you can- read your entire database into memory if it
will fit. If not then try to ensure you can read your entire indices in
memory. Create an index for any field you'll be querying on to avoid
having to read the entire record. If you're dealing with massive data,
think about indices of indices. Work on the data, or at least the
indices. in memory.

Well, that's everything I ever learned about database design.

Regards

Ian
--
Ian Parker
Jul 18 '05 #3

P: n/a
I.V. Aprameya Rao <ap******@students.iiit.net> wrote:
Hi

I have to implement a flat file dbms. The basic condition is that
relations will be given in files and i will have to run certain select
project join queries on those relations.

Can someone tell me as to which language will be faster, python or C++??


GDBM. It's already flat file.

--
William Park <op**********@yahoo.ca>, Toronto, Canada
Slackware Linux -- because it works.

Jul 18 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.