speeding up my db appliacation 
Author Message
 speeding up my db appliacation
Does anyone have any idea how I can make my appliacation
run faster. Part of my problem may be that I am only running
my appliacation with 4 megs, however, a larger part of the
problem seems to be that the access database the front end  
serves loads the whole database into memory before running.
If i am on the first record and want to move to the last It
takes far too long.

I do not seem to have these problems when using dbase programs
and a dbase format database.



Sun, 19 Oct 1997 03:00:00 GMT
 speeding up my db appliacation

Quote:

> Does anyone have any idea how I can make my appliacation
> run faster. Part of my problem may be that I am only running
> my appliacation with 4 megs, however, a larger part of the
> problem seems to be that the access database the front end  
> serves loads the whole database into memory before running.
> If i am on the first record and want to move to the last It
> takes far too long.

> I do not seem to have these problems when using dbase programs
> and a dbase format database.

The most important thing you can do is to get rid of the Data Control.
I was using the Data Control to access a database with 500,000+ records,
and it was taking 3-5 minutes to find a record.  When I switched to
Database objects, I was able to use the INDEX of the database, and I
now have access times of less than 1 second.  Unbelievable improvement,
and using the Database objects is a lot easier than the manual makes
it look.

Byron Jones



Tue, 21 Oct 1997 03:00:00 GMT
 speeding up my db appliacation

: > Does anyone have any idea how I can make my appliacation
: > run faster. Part of my problem may be that I am only running
: >
: > I do not seem to have these problems when using dbase programs
: > and a dbase format database.

: The most important thing you can do is to get rid of the Data Control.
: I was using the Data Control to access a database with 500,000+ records,
: and it was taking 3-5 minutes to find a record.  When I switched to
: Database objects, I was able to use the INDEX of the database, and I
: now have access times of less than 1 second.  Unbelievable improvement,
: and using the Database objects is a lot easier than the manual makes
: it look.

: Byron Jones

Just short "soap box" thing here:

   VB's db engine is dataset-oriented, not record-oriented like dBase,
and FoxPro. Also, since the VB engine will always xlate things into
SQL-type processing, any work on record-oriented systems will require
translating SQL lingo into local db engine lingo to get the data you
requested.

The most common construct in record-oriented systems is the DO.. WHILE
loop and the SEEK function.  The most common construct in the dataset
oriented systems is the SELECT...WHERE and the UPDATE..SET commands.

If you use VB's data control to perform Find operations, you'll always
get slower performance than native record-oriented engines.  However,
if you need to locate all records in a data table that have their
country code set to UK (let's say 100,000 out of 500,000) and update
their unit tprice field by an increase of 10%, using VB's queryDef and
update-style queries will absolutely outperform record-oriented
systems.

Also, keep in mind, you will NOT be able to use the TABLE data object
if you attach to an ODBC data source.  You'll need to use Dynasets
or Snapshots only.  There are lots of ways to speed record lookup in
set-orients systems. One should never have a Dynaset set of 500,000
records.

OK - sorry for the ranting!

PEACE

MCA

+-------------------------------------------------------------------------+

| Voice....: 513/381-4610                 FAX.....: 513/421-9657          |
| SnailMail: Aviation Planning Assoc, Inc. 421 Arch St. Cinti, OH  45202  |
+-------------------------------------------------------------------------+



Wed, 22 Oct 1997 03:00:00 GMT
 speeding up my db appliacation

Quote:

>Does anyone have any idea how I can make my appliacation
>run faster. Part of my problem may be that I am only running
>my appliacation with 4 megs, however, a larger part of the
>problem seems to be that the access database the front end  
>serves loads the whole database into memory before running.
>If i am on the first record and want to move to the last It
>takes far too long.

I think the problem is indeed that you are running with only 4 meg of RAM. You
need 6-12meg (8 seems to to work fine for me) to get good performance.

Also, keep in mind that the built-in caching will cause small databases to be
loaded to RAM. However, these types of operations are essential for the
database engine to achieve high performance. Again, I recommend you get more
RAM before trying to tweak performance.



Thu, 23 Oct 1997 03:00:00 GMT
 speeding up my db appliacation

Quote:

>Subject: Re: speeding up my db appliacation
>Date: 6 May 1995 13:34:36 -0400


>: > Does anyone have any idea how I can make my appliacation

One thing I have found is to code the SQL statement (Select * from db where
field  = "something";)   and make that the recordsource.   From my
experimentation, I can then have the jet engine use indexs for the lookup.  
That way I can avoid having to write code to read the dynaset from a querydef
and load a list box etc.  

Also the take a look at the way you have the indexes set in the tables.   This
is dynamic SQL and there are no stats for an optimizer to use and the MS
Access optimizer doesn't exactly look like a world beater



Sat, 25 Oct 1997 03:00:00 GMT
 speeding up my db appliacation

Quote:

>>Does anyone have any idea how I can make my appliacation
>>run faster. Part of my problem may be that I am only running
>>my appliacation with 4 megs, however, a larger part of the
>>problem seems to be that the access database the front end  
>>serves loads the whole database into memory before running.
>>If i am on the first record and want to move to the last It
>>takes far too long.
>I think the problem is indeed that you are running with only 4 meg of RAM. You
>need 6-12meg (8 seems to to work fine for me) to get good performance.
>Also, keep in mind that the built-in caching will cause small databases to be
>loaded to RAM. However, these types of operations are essential for the
>database engine to achieve high performance. Again, I recommend you get more
>RAM before trying to tweak performance.

Eric I am not jumping on you but this mindset that to get performance
you need to sink more money into hardware.  Programmers can quit
taking short cuts just to get the product out the door for one thing.
Of course, I fall into the later category as well and I'll admit
sometimes I've thrown some pretty awful code down just to complete the
demo.  But we do not have to keep thinking that it is the user's fault
for not having a Pentium 125 with 32Mb either.

Oh well, enough of that.



Sat, 25 Oct 1997 03:00:00 GMT
 speeding up my db appliacation

Quote:

>Does anyone have any idea how I can make my appliacation
>run faster. Part of my problem may be that I am only running
>my appliacation with 4 megs, however, a larger part of the
>problem seems to be that the access database the front end  
>serves loads the whole database into memory before running.
>If i am on the first record and want to move to the last It
>takes far too long.

>I do not seem to have these problems when using dbase programs
>and a dbase format database.

A few things you could consider:

-Make sure that your tables have indexes in them.  It is always faster
to search on a key.

-Use the seek method on a table instead of searching large dynasets.

-Use SQL passthrough if you are running queries whose results are
for display only.

-Avoid SELECT * and name out the fields you need to retrieve in
your SQL statements.

Hope these help.



Sat, 25 Oct 1997 03:00:00 GMT
 speeding up my db appliacation

ETI think the problem is indeed that you are running with only 4 meg of RAM. Y
  need 6-12meg (8 seems to to work fine for me) to get good performance.

Hi:

You mean if I hade more than 2 MB RAM I wouldn't keep

falling asleep at the keyboard. ;-)

BW

Gerald

 * 1st 2.00h #7087 * "$6.40MB should be enough for anybody" - not Bill Gates



Mon, 27 Oct 1997 03:00:00 GMT
 
 [ 8 post ] 

 Relevant Pages 

1. NT speeds-ups?

2. How do _you_ rev a multi-database appliacation?

3. Speed, speed, speed, and Sybase disk limitations

4. Speed, speed, speed...

5. Speed, Speed, Speed, and a ramdisk too

6. Speed Processing Slows Down When Using SQL DB Version 8.0

7. search speed on large access db using jet

8. How to Improve the DB open speed?

9. DB Speed - Need Some Good Ideas

10. Speed: DB-library and Store procedure???

11. DB-Lib question/High speed access to SQL Server

12. Problem with DB speed in VB5


 
Powered by phpBB® Forum Software