Question of speed - Flat file DBMS

  • Thread starter I.V. Aprameya Rao
  • Start date
I

I.V. Aprameya Rao

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
 
J

John Machin

I.V. Aprameya Rao said:
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.
 
I

Ian Parker

I.V. said:
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

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
 
W

William Park

I.V. Aprameya Rao said:
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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,051
Latest member
CarleyMcCr

Latest Threads

Top