Question of speed - Flat file DBMS

Discussion in 'Python' started by I.V. Aprameya Rao, Mar 5, 2005.

  1. 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
    I.V. Aprameya Rao, Mar 5, 2005
    #1
    1. Advertising

  2. I.V. Aprameya Rao

    John Machin Guest

    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.
    John Machin, Mar 5, 2005
    #2
    1. Advertising

  3. I.V. Aprameya Rao

    Ian Parker Guest

    In message <>, I.V.
    Aprameya Rao <> 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
    Ian Parker, Mar 6, 2005
    #3
  4. I.V. Aprameya Rao

    William Park Guest

    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++??


    GDBM. It's already flat file.

    --
    William Park <>, Toronto, Canada
    Slackware Linux -- because it works.
    William Park, Mar 6, 2005
    #4
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. P.DELMAS
    Replies:
    3
    Views:
    3,232
    P.DELMAS
    Oct 1, 2003
  2. Steven Woody

    Recommended Open Source DBMS for J2EE

    Steven Woody, Oct 21, 2003, in forum: Java
    Replies:
    10
    Views:
    989
    Drew Volpe
    Oct 23, 2003
  3. Maurice LING

    Seeking for SQL99 pure Java DBMS

    Maurice LING, Jul 1, 2004, in forum: Java
    Replies:
    1
    Views:
    427
    Roedy Green
    Jul 1, 2004
  4. Jia Lu

    Flat DB seeking speed

    Jia Lu, Apr 22, 2007, in forum: Python
    Replies:
    3
    Views:
    294
  5. Weng Lei-QCH1840
    Replies:
    1
    Views:
    178
    Thomas
    Aug 15, 2003
Loading...

Share This Page