Article View: borland.public.cppbuilder.database.ado
Article #2079Re: Accessing highest auto number
From: Kasper Larsen
Date: Thu, 04 Dec 2003 19:16
Date: Thu, 04 Dec 2003 19:16
65 lines
4304 bytes
4304 bytes
What is the values for a Big Mac menu ? ;-) Kasper "Ted Byers" <r.ted.byers@sympatico.ca> skrev i en meddelelse news:3fcf86dc$1@newsgroups.borland.com... > > "Kasper Larsen" <kb_larsen@hotmail.com> wrote in message > news:3fcf8077@newsgroups.borland.com... > > Hi Ted > > Since it is a read only DB you might be able to use a solution I've used > > with success : > > I create a struct from the field definitions for each table I need. Then I > > simply read all rows into a stl::vector<struct>. When I need to analyse > the > > data I use the vectors and it is a factor 5 faster then reading the Access > > db. I guess this indicates that the real bottleneck must be the disc > access. > > > Or it may be the way SQL statements are processed. I modified my SQL along > the lines I suggested to Simon and found an improvement in performance by a > factor of about 50. > > FWIW, I was going to go the route you suggest if my modification of my SQL > didn't give a sufficient improvement in performance. I went the route of > modifying the SQL first, though, since that required a change in only one > function while using a vector of structs or classes would have had > ramifications throughout my program. The concern I'd have with that is > that, ignoring the minimal overhead of the vector, this option would create > an object in excess of 3.35 MB in size, and in any particular instance, only > a tiny fraction of this would be used (typically less than 0.5%). The > database in question has nutritional content for 125 nutrients in close to > 6700 foods; and I'd like to see it grow to cover the more exotic (to north > american taste) foods. > > I am rather pleased. This program is ready for beta testing, and allows the > user both to enter and store recipes and to analyse recipes for their > nutritonal value, and to create a menu plant for a week which the user can > alter to take into account the nutritional requirements of each member of > the user's family. I am planning a premium edition which will allow the > user to keep a diary of what has been eaten when, along with health related > information such as exercise periods/intensity, weight, blood sugar levels > (if the user's family includes a diabetic who tests this), and any disease. > Another difference between this version and the planned premium version is > that while this version allows the user to make as many recipe databases as > desired, only one can be loaded at a time, and the premium version will > allow as many recipe databases to be loaded as the user wishes. > > My only worry is whether or not a program developed on W2K with Office 2K, > and the latest MDAC, will run OK on other flavours of Windows. > > Cheers, > > Ted > >
Technical Details
Message-ID:
<3fcf880d@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!newsfeed2.dallas1.level3.net!news.level3.com!crtntx1-snh1.gtei.net!washdc3-snh1.gtei.net!news.gtei.net!ngpeer.news.aol.com!feed2.newsreader.com!newsreader.com!newshosting.com!news-xfer2.atl.newshosting.com!216.166.71.118.MISMATCH!small1.nntp.aus1.giganews.com!border1.nntp.aus1.giganews.com!nntp.giganews.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mailReferences:
<vIB+nCAzsMz$IwBT@courtlands.demon.co.uk> <3fccec42$1@newsgroups.borland.com> <rUI$wAAUogz$IwA9@courtlands.demon.co.uk> <3fce1ab8@newsgroups.borland.com> <0x0o5DAm3lz$Iww1@courtlands.demon.co.uk> <3fcea31a$1@newsgroups.borland.com> <3fcf8077@newsgroups.borland.com> <3fcf86dc$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10698b,3afd7f6873225c1f X-Google-Attributes: gid10698b,public X-Google-ArrivalTime: 2003-12-04 11:25:49 PST Reply-To: "Kasper Larsen" <kb_larsen@hotmail.com> From: "Kasper Larsen" <kb_larsen@hotmail.com> Newsgroups: borland.public.cppbuilder.database.ado References: <vIB+nCAzsMz$IwBT@courtlands.demon.co.uk> <3fccec42$1@newsgroups.borland.com> <rUI$wAAUogz$IwA9@courtlands.demon.co.uk> <3fce1ab8@newsgroups.borland.com> <0x0o5DAm3lz$Iww1@courtlands.demon.co.uk> <3fcea31a$1@newsgroups.borland.com> <3fcf8077@newsgroups.borland.com> <3fcf86dc$1@newsgroups.borland.com> Subject: Re: Accessing highest auto number Date: Thu, 4 Dec 2003 20:16:28 +0100 Lines: 67 Organization: Seden Sytemudvikling X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1158 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 NNTP-Posting-Host: 192.38.163.42 Message-ID: <3fcf880d@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1070565389 192.38.163.42 (4 Dec 2003 11:16:29 -0700) Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!newsfeed2.dallas1.level3.net!news.level3.com!crtntx1-snh1.gtei.net!washdc3-snh1.gtei.net!news.gtei.net!ngpeer.news.aol.com!feed2.newsreader.com!newsreader.com!newshosting.com!news-xfer2.atl.newshosting.com!216.166.71.118.MISMATCH!small1.nntp.aus1.giganews.com!border1.nntp.aus1.giganews.com!nntp.giganews.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail