🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.database.ado
Article #332

Re: Too Slow

#332
From: Giuliano
Date: Tue, 08 Aug 2006 18:32
19 lines
1370 bytes
On Tue, 8 Aug 2006 18:04:33 +0300, "Cenk" <cenk1536@yahoo.com> wrote:

>but this loop takes appox. 45 minutes to complete!
Argh! This seems an enormous amount of time...

> CountQuery->CommandText = "select [bid],[fTime] from ["+table+"] order by 
>[fTime] ASC";
Have you tried to create an index for the ftime field?  It's possible it could
help...

Also, you can try to call "vector<T>::reserve()" before you start to insert
items: this maybe would reduce the amount of reallocations to make room for
your data.

Hope this helps!

Ciao

Giuliano
Technical Details
Message-ID: <0mlhd2107hfrkn0cfodh4mgg9m8564738k@4ax.com>
Path: arc1-ca.pugleaf.net!g2news2.google.com!news3.google.com!news4.google.com!news2.volia.net!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <44d8a854@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 10698b,9e074baf94073a9a
X-Google-Attributes: gid10698b,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: Giuliano <giuliano@ remove .zofm.net>
Newsgroups: borland.public.cppbuilder.database.ado
Subject: Re: Too Slow
Date: Tue, 08 Aug 2006 20:32:12 +0200
Message-ID: <0mlhd2107hfrkn0cfodh4mgg9m8564738k@4ax.com>
References: <44d8a854@newsgroups.borland.com>
X-Newsreader: Forte Agent 2.0/32.652
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 81.72.236.131
X-Trace: newsgroups.borland.com 1155061931 81.72.236.131 (8 Aug 2006 11:32:11 -0700)
Lines: 19
Path: arc1-ca.pugleaf.net!g2news2.google.com!news3.google.com!news4.google.com!news2.volia.net!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail