Reading from dataBase

P

PawelR

Hi group,
Sorry my English is very little
I've question about reading data from database. In sql2k I've table (50k+
records). Commerce application writing to this table same data (up to 5
records per minute).
My application must show new records for example in dataGrid (refresh approx
once per 15 seconds - max).
If I use to refresh dataSet:
myDataAdapter.Fill(MyDS, "Table1"); //event onTick for Timer

dataGrid is refreshed very slow (approx. 10 minuts for 45k rekords). I use
this on one computer. I thing If I use this on different computer
(DataSerwer and few clients with myApps) this will be more slowest.
How fast read from dataBase only new date.

Maybe somebody have some different idea for this solution.

Best regards

PawelR
 
?

=?ISO-8859-2?Q?Marcin_Grz=EAbski?=

Hi/Cze¶æ Pawe³

If i were you, i'll try to realize this goal by
structure of DB.

If there are only INSERT commands that modifies recordset,
then you can provide unique ID for each record or datetime
field.

A) integer ID case
1. set: int id=-1; (out of recordset ID's range)
2. select all records with ID greater than "id"
3. select or find max id and set: id=FindMaxId(recordset);

B) datetime case (ID_DATETIME)
1. set: Datetime lastTime=FindMinIdDatetime(recordset);
2. select (for refresh) all records with ID_DATETIME greater
or equal to "lastTime".
- here is possibility of cloning records with the same ID_DATETIME
3. select of find max "lastTime": lastTime=FindMaxDatetime(recordset);

HTH & Pozdrowienia!

Marcin
 

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

Top