473,406 Members | 2,281 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

Question of speed - Flat file DBMS

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
3 2267

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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Steven James Samuel Stapleton | last post by:
Will calling ksort() on an array speed up it's access? For example, I have the array $file_index, which is accessed by a key (the entry id) and has two sub elements in a one dimensional array...
11
by: Markku Uttula | last post by:
I think I'm doing something wrong. I'm able to connect to Oracle just fine, execute queries and all, but I'm having serious problems with the speed :( For example, the following PHP-script on my...
2
by: Albert Tu | last post by:
Hi, I am learning and pretty new to Python and I hope your guys can give me a quick start. I have an about 1G-byte binary file from a flat panel x-ray detector; I know at the beggining there...
0
by: Ruslan A Dautkhanov | last post by:
Hello ! I create the index CREATE INDEX details_loaded ON details (loaded); where loaded - CHAR(1) DEFALUT 'N'. The column details.loaded used to determine is this row processed or not, so...
9
by: noone | last post by:
I have a database file that I use an autonumber field as the primary key index. Because of some rearrangements in the past, this index does not match the order that I would like it to be in, that...
18
by: David Buchan | last post by:
Hi guys, This may be a dumb question; I'm just getting into C language here. I wrote a program to unpack a binary file and write out the contents to a new file as a list of unsigned integers....
10
by: Bonj | last post by:
I almost understand TSTs, to the point where I just need to know the answer to this: When making a TST (in C++) that will have as its leaf nodes words that make up SQL language and an categorising...
20
by: fniles | last post by:
I am using VS2003 and connecting to MS Access database. When using a connection pooling (every time I open the OLEDBCONNECTION I use the exact matching connection string), 1. how can I know how...
15
by: lxyone | last post by:
Using a flat file containing table names, fields, values whats the best way of creating html pages? I want control over the html pages ie 1. layout 2. what data to show 3. what controls to...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.