Icon View Thread

The following is the text of the current message along with any replies.
Messages 11 to 19 of 19 total
Thread Temporary Index
Mon, Jun 8 2009 10:57 AMPermanent Link

"Robert"

"Eric Derrien" <ederrien@hotmail.com> wrote in message
news:245A00DA-2A51-4D97-9CFB-A0694C9B6355@news.elevatesoft.com...
> "Robert" wrote:
>
> Yeah, I know what you mean. You might consider adding the index to the
> table. Indexes cost very little in DBISAM.
>
> Robert
>
> That's the irony?
> Sorry but English is not my language ...
>
> My customer use a table "documents" with 350 000 records (this table
> contains 69 fields and 17 indexes)
> My customer use filters for view only invoice for a salesvendor, agency
> and amount > 10 000? (time 1mn, 30 records, default sort = date invoice)
> My customer sorted by amount and this customer does not understand that ca
> take 1 minute time when the results are already on the screen
>
> So I sought a solution that allows to sort results quickly without an
> query restart
> I myself well expressed?
>

Yeah, I get you (I think). My point is that indexes in DBISAM tables cost
very little in processing time. Once you have the index you then change the
index name on a tTable and get instant re-ordering of the table. After all,
you already have 17 indexes, why not add another Smiley

Robert

Mon, Jun 8 2009 11:24 AMPermanent Link

Eric Derrien
"Robert" wrote:


"Eric Derrien" <ederrien@hotmail.com> wrote in message
news:245A00DA-2A51-4D97-9CFB-A0694C9B6355@news.elevatesoft.com...
> "Robert" wrote:
>
> Yeah, I know what you mean. You might consider adding the index to the
> table. Indexes cost very little in DBISAM.
>
> Robert
>
> That's the irony?
> Sorry but English is not my language ...
>
> My customer use a table "documents" with 350 000 records (this table
> contains 69 fields and 17 indexes)
> My customer use filters for view only invoice for a salesvendor, agency
> and amount > 10 000? (time 1mn, 30 records, default sort = date invoice)
> My customer sorted by amount and this customer does not understand that ca
> take 1 minute time when the results are already on the screen
>
> So I sought a solution that allows to sort results quickly without an
> query restart
> I myself well expressed?
>

Yeah, I get you (I think). My point is that indexes in DBISAM tables cost
very little in processing time. Once you have the index you then change the
index name on a tTable and get instant re-ordering of the table. After all,
you already have 17 indexes, why not add another Smiley

Robert

138 index in this case not including calculated fields , joins on other tables, etc. !!

In any case, it does not answer my first question...
in a TDataSet, simply position the logical buffers according to the lines that you want to view what I do before the call to GetRecord
but after the method GetRecord changing the indices in buffers, while the code looks good even after debugging the code below DBISAM :

        case GetMode of
           gmCurrent:
              TempCode:=FHandle.GetCurrentRecord(pAnsiChar(Buffer),False);
           ...  
           end;
     case TempCode of
        DBISAM_NONE:
           begin
           with PRecInfo(Buffer+FRecInfoOfs)^ do
              begin
              BookmarkFlag:=bfCurrent;
              RecordNumber:=FHandle.RecordNumber;
              end;
           GetCalcFields(Buffer);
           FHandle.GetBookmark(pAnsiChar(Buffer)+FBookmarkOfs);
           Result:=grOK;
           end;
Mon, Jun 8 2009 3:08 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Eric,

<< My customer use a table "documents" with 350 000 records (this table
contains 69 fields and 17 indexes)
My customer use filters for view only invoice for a salesvendor, agency and
amount > 10 000€ (time 1mn, 30 records, default sort = date invoice)
My customer sorted by amount and this customer does not understand that ca
take 1 minute time when the results are already on the screen >>

DBISAM should be able to handle this situation in an optimal fashion.  Would
it be possible for you to send me the table and the filter that you're using
?

--
Tim Young
Elevate Software
www.elevatesoft.com

Mon, Jun 8 2009 3:09 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Eric,

<< I also tried this method, the recordings are well positioned by the
buffers before call inherited GetRecord (TDBIsamTable) against then do not
contain the  proper records which displays in the grid.
I'm try to set Buffer with method "Buffer  :=
TRecordBuffer(Handle.CurrentRecordBuffer);" before call "inherited
GetRecord" but not change, same problem >>

Please send me the latest code that you're using, and I'll tell you what the
issue is.

--
Tim Young
Elevate Software
www.elevatesoft.com

Tue, Jun 9 2009 1:48 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Eric

>My customer sorted by amount and this customer does not understand that ca take 1 minute time when the results are already on the screen

If you're showing the results using a grid why not move to one of the more advanced grids (DevEx, TMS or NextGrid) which will allow you to sort the grid in memory. It takes a bit more programming work but 1) you get a pretty looking grid and 2) you get very fast user controlled sorts.

Roy Lambert [Team Elevate]
Tue, Jun 9 2009 4:57 AMPermanent Link

Eric Derrien
Roy Lambert wrote:

Eric

>My customer sorted by amount and this customer does not understand that ca take 1 minute time when the results are already on the screen

If you're showing the results using a grid why not move to one of the more advanced grids (DevEx, TMS or NextGrid) which will allow you to sort the grid in
memory. It takes a bit more programming work but 1) you get a pretty looking grid and 2) you get very fast user controlled sorts.

Roy Lambert [Team Elevate]

I use a grid with many method derivated from TCustomDBGrid of DELPHI (since 7 years) and I not the time for re develop all methods (unless no other
solutions)

@Tim
I can get a data for a customer but with a 100MB compressed file. how do you obtain the file ?


Tue, Jun 9 2009 9:51 AMPermanent Link

Eric Derrien
"Tim Young [Elevate Software]" wrote:
Please send me the latest code that you're using, and I'll tell you what the
issue is.

I'm found the problem

after several tries, I replaced the method "GetRecNo" with "Handle.RecordNumber" but it does not always return the correct record number in "SetOrderBy"
method

GetRecNo for save the Record Number in SetOrderBy method And Handle.SetToRecorNumber for retrieve the record in GetRecord method

Thank you for your help
Tue, Jun 9 2009 2:42 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Eric,

<< I can get a data for a customer but with a 100MB compressed file. how do
you obtain the file ? >>

With a very large table, I normally request that you put it somewhere on an
FTP or web site where I can download it.

Hopefully I can get a file uploader implemented shortly that will allow you
to upload the files directly to us.

--
Tim Young
Elevate Software
www.elevatesoft.com

Fri, Jun 12 2009 8:30 AMPermanent Link

"John Hay"
Eric

> My customer use a table "documents" with 350 000 records (this table
contains 69 fields and 17 indexes)
> My customer use filters for view only invoice for a salesvendor, agency
and amount > 10 000? (time 1mn, 30 records, default sort = date invoice)
> My customer sorted by amount and this customer does not understand that ca
take 1 minute time when the results are already on the screen
>
> So I sought a solution that allows to sort results quickly without an
query restart
> I myself well expressed?

How about using a query to select the results into a memory table.  You can
then add an index very quickly to re-sort the data while still using your
modified TDBGrid.

John

« Previous PagePage 2 of 2
Jump to Page:  1 2
Image