473,739 Members | 7,912 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 2282

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************ *************** ************@py thon.org>, I.V.
Aprameya Rao <ap******@stude nts.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******@stude nts.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**********@y ahoo.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
4846
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 (line number of the start of the entry in the file, and the byte offset of the start of the entry). so, I might have an array that can be represented thus: {
11
3313
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 machine executes about 6 seconds: <? $db_conn = ocilogon("my_username", "my_password", "my_database"); $loop_count = 1000;
2
2048
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 is a 128-byte header and the rest of the file is integers in 2-byte format. What I want to do is to save the binary data into several smaller files
0
1709
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 index details_loaded used to speed up request when my program fetch not loaded records.
9
1571
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 is date order. What I would like to do is to eliminated the primary key field (I know how to do this), sort on the date field, and then reindex with a new autonumber field. Every time I try, however, the default sort field left over from the...
18
3041
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. It works on an IBM mainframe under AIX with GCC, but has trouble on Intel with GCC (DJGPP). I think it's an endian problem. The trouble is, although most values in the extracted list are correct,
10
1304
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 identifier for each one, and each layer of the tree will represent comparison of a further letter within the search string, what will happen when a particular node is a leaf node itself, but also has leaf nodes of its own? i.e. specifically, as...
20
3291
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 many connection has been used ? 2. If the maximum pool size has been reached, what happens when I call the method Open to open the connection ? Will I get an error ? MSDN says the request is queued, but will I get an error in the open method ? ...
15
5276
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 show - text boxes, input boxes, buttons, hyperlinks ie the usual. The data is not obtained directly from a database.
0
9479
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9337
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9266
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9209
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6754
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4826
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3280
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2748
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2193
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.