473,405 Members | 2,141 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,405 software developers and data experts.

Q: Tip and advice on DataBase related question.

Hi!

I am going to build my firs Windows Application that involves a Database.

Now this database and its tables are quite large so i got a couple of quizes
regarding performance etc just to get me started...

One of the tables includes over a milion customers. This is not a great idea
to read in to a dataset i figured out, the hard way i might ad. So i created
a DataGridView wich fills the top 250 customers. Now for the tricky part
that i just cant figure out on how to do. when i scroll down, i would like
read the next 250 customers. Dont know if this is a good idea. Because how
is performnace when you reach that milion'th customer and the grid is
complete with 1 milion customers? Any tips, code directions etc to guide me?

This is my initial question for now. I will surly have more in the future.

Thanx in advance

regards
Martin
Nov 23 '06 #1
2 1250
Tips? Yes: don't try to display a million rows in a grid. Even in
"virtual" mode, what is the use? It sounds to me that what you really
want to be writing is a dynamic search screen, that brings back (as you
rightly started) paged data; 250 rows is a good size for a page.

But start off with *something*. Even the most insane manager isn't
going to scroll through 1M rows... let them enter the name, post [zip]
code, order number, "contacted between dates", *something* (refer to
the requirements document... OK... first gather requirements ;-p). You
could even use regex to identify the pattern to make for better
searching (looks like a zip; search on zip; looks like an order number;
search via orders; else search by name, etc).

Also; with large data, don't try and hold it in memory all at once
(unless you have Win64 and a great pile of memory and a fast network
*to yourself* and a SAN and (you get the idea; don't do it!);
DataReader might be worth a look (using custom objects rather than
DataSets), or you could just keep the data volume down.

Marc

Nov 23 '06 #2
TIP:: I have one....

What I understood is that you want to display data on to a view, the
data is very bulk...Umm.. 1million...

In this case I prefer avoiding display all the data, but give the user
a choice of search by a field ...... would be better option....

If you still want to display all the data,
1. create a dataview and read the top 250 rows and display
2. If user clicks or scrolls down for next data, flush the previous
data and query database for the next 250 rows, and on... (Yes you may
need to maintain the index on your form)

By flushing the previous data, at any given point of time there will
not be more than 250 rows in memory.
As far as performance is concerned, for storing 1million db rows, I
assume you have a strong DB server. which will give you 250 rows in
fraction of time. Also run the query statement in a separate thread, so
that user will not get hour glass on winform...

Thanks
-CNU.

Martin Arvidsson wrote:
Hi!

I am going to build my firs Windows Application that involves a Database.

Now this database and its tables are quite large so i got a couple of quizes
regarding performance etc just to get me started...

One of the tables includes over a milion customers. This is not a great idea
to read in to a dataset i figured out, the hard way i might ad. So i created
a DataGridView wich fills the top 250 customers. Now for the tricky part
that i just cant figure out on how to do. when i scroll down, i would like
read the next 250 customers. Dont know if this is a good idea. Because how
is performnace when you reach that milion'th customer and the grid is
complete with 1 milion customers? Any tips, code directions etc to guide me?

This is my initial question for now. I will surly have more in the future.

Thanx in advance

regards
Martin
Nov 24 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: David Freeman | last post by:
Hi All! I'm developing a website for a software company. They want to publish news, tip/tricks and other articles on company's news section. I would like to get advice on - how to name the...
3
by: James Armstrong | last post by:
Hi all, (warning - long post ahead) I have been tasked with designing a database for my company which will store trade information (it is a financial firm). It will need to export this info...
0
by: rifraf47 | last post by:
My office of 6 folks want to put together a large database (over a million records) and hit it often with querries. Can someone offer up some advice on how to go about this? These are options I've...
1
by: David Van D | last post by:
Hi there, A few weeks until I begin my journey towards a degree in Computer Science at Canterbury University in New Zealand, Anyway the course tutors are going to be teaching us JAVA wth bluej...
13
by: Alan Silver | last post by:
Hello, MSDN (amongst other places) is full of helpful advice on ways to do data access, but they all seem geared to wards enterprise applications. Maybe I'm in a minority, but I don't have those...
0
by: coolCoder | last post by:
jzlondon wrote: Hi, Just for precaution, I think you should sync the connection object. Actually, I faced a lot of weird errors which originated from these kind of thread sync problem. The...
3
by: shapper | last post by:
Hello, I created a simple class as follows: Public Class HelloWorld Public Function SayMessage() As String Return "Hello World!" End Function
5
by: Ted | last post by:
I am working on two versions of an application, one of which will be a windows forms application (which will need to be redistributable) and the other will be a web application. I have MS Visual...
23
by: JohnH | last post by:
I'm just recently come to work for an auto brokerage firm. My position involves performing mysterious rites, rituals and magick in order to get information out of their access database. This is...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
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...
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...

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.