borderAndreaVB free resources for Visual Basic developersborder

borderAndreaVB Visual Basic and VB.NET source code resources - Copyright © 1999-2007 Andrea Tincaniborder

AndreaVB | Forum | News | Downloads | Register | Help | Member List | Statistics | Search | PM | Profile

Print This Topic
Previous Topic (CAN WE MODIFY OCX FILES BY ANY WAY?)Next Topic (can you help me please for my project...) New Topic New Poll Post Reply
AndreaVB Forum : VB General : large no. of records in db causes application to slow down
Poster Message
aak_neo
Level: Scholar


Registered: 11-02-2007
Posts: 30

icon large no. of records in db causes application to slow down

i have an adodc1 connected to a database having about 25,000 records and 12 fields(since its a real time db so has second to second readings). i have a flex grid & a mschart having data source as adodc1. whenever i run, a small application like this also loads the pc to the extent that program doesn't respond.But without the chart it runs normally but still somewhat slow.

why is this so? if it has to be this way plz suggest an effective way to manage such an extensive db where records increase every second of the day.

____________________________
You never see past the choices you don't understand

24-02-2007 at 04:28 AM
View Profile Send Email to User Show All Posts | Quote Reply
vbgen
Level: Moderator

Registered: 10-10-2002
Posts: 876
icon Re: large no. of records in db causes application to slow down

one thing you should read on is MULTI-THREADING...

normally, when working on a single thread... the current procedure has to be completed before the next procedure can start... what this does to the application is make it seem like it's hanging; you can't click or select anything.. until the process is done.

with 25000 records being read...    ..yep.. that blows.

now.. another thing to consider: is your sql optimized? i mean.. are you selecting only the fields you need.. and not just using the asterisk to get all?



____________________________
Been busy trying to take a second degree <--it's not working out...

05-03-2007 at 02:34 PM
View Profile Send Email to User Show All Posts | Quote Reply
aak_neo
Level: Scholar


Registered: 11-02-2007
Posts: 30
icon Re: large no. of records in db causes application to slow down

yes u are absolutely correct in guessing that my sql selects all fields but thats so coz its required as per the application.

my db has foll. fields id,date,time, ch1,ch2,ch3,ch4,ch5,ch6,ch7,ch8 where chx are channel voltages. each day about
24x60x60=86400 records get added in the db. i thought of distributing as 1 db per day having 24 tables corresponding to each hour. now this will also do for me
                   but there is a form in my project which displays on chart some of these records by
              1.getting the start day,start time from user(gives start_id)
              2.getting the end day,end time from user(gives end_id)
              3. display the data in between these id's on chart  
with one table & one database it seems simple.But with even two tables it will coz problems as how will i be able to fill a recordset
with data from two or more different tables. a recordset i m saying as chart needs one recordset to display data.
             can i fill a recordset with data from different tables? or do u suggest i should use a different db altogether to get the desired recordsource?     

____________________________
You never see past the choices you don't understand

05-03-2007 at 04:20 PM
View Profile Send Email to User Show All Posts | Quote Reply
vbgen
Level: Moderator

Registered: 10-10-2002
Posts: 876
icon Re: large no. of records in db causes application to slow down

www.w3schools.com

is a good place to start learning SQL...

yes, with a single SQL statement/query, you can retrieve data from two or more tables.  

what data storage are you using in the first place?

another thing... perhaps.. if you could give a little more info on your tables... maybe we can optimize the data storage. i'm a bit skeptical on whether or not your tables are really normalized.

like i also said... when you have time, look up MULTI-THREADING... if it can't help on pushing the procedures at full speed, at least it'll help you keep the user from thinking that the whole application got stuck.

lastly, i'm not going to feed you the sql immediately.. it will be much, much better if you read on SQL on your own, and try to understand it first... because as a vb programmer, you will often encounter projects that utilize data storing.  

____________________________
Been busy trying to take a second degree <--it's not working out...

06-03-2007 at 04:25 AM
View Profile Send Email to User Show All Posts | Quote Reply
AndreaVB Forum : VB General : large no. of records in db causes application to slow down
Previous Topic (CAN WE MODIFY OCX FILES BY ANY WAY?)Next Topic (can you help me please for my project...) New Topic New Poll Post Reply
Surf To:


Not Logged In? Username: Password: Lost your password?
Partners: Download Actual Software | Free Software Download
borderAndreaVB free resources for Visual Basic developersborder

borderAndreaVB Visual Basic and VB.NET source code resources - Copyright © 1999-2007 Andrea Tincaniborder