Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 4 of 4 total
Thread Simple Query much slower than Table
Fri, Apr 3 2009 5:51 AMPermanent Link

"Burkhard Schneider"
Hi,

I have a very simple SQL statement:

Select *
From Zeiten

This performs in 2.7 seconds. The Table "Zeiten" has about 71000 records.

When I use a TDBISAMTable I get the same result at once. I see all 71000
records in a DBGrid whitout a remarkable interruption.

Why is there such a big difference in performance of a Query and a Table?

What can I do to optimize the query? This simple SQL-Statement is for
testing purposes only. In the application it's more complicated. There are
already corresponing indexes in the table for the more complicatet SQLs.

Delphi 2007, DBISAM 4.25 C/S

Regards
Burkhard Schneider

Fri, Apr 3 2009 6:29 AMPermanent Link

Fernando Dias

Team Elevate Team Elevate

Burkhard,

Do you have the TDBISAMQuery.RequestLive property set to true?

--
Fernando Dias
[Team Elevate]

Fri, Apr 3 2009 6:54 AMPermanent Link

"Burkhard Schneider"
"Fernando Dias" schrieb:

> Burkhard,
>
> Do you have the TDBISAMQuery.RequestLive property set to true?
>
> --
> Fernando Dias
> [Team Elevate]

No, I didn't, but I have now.
When I set RequestLive to true, the Performance of the query is the same als
with the table. Is this correct?

Regards,
Burkhard Schneider

Fri, Apr 3 2009 7:11 AMPermanent Link

Fernando Dias

Team Elevate Team Elevate

Burkhard,

> When I set RequestLive to true, the Performance of the query is the same
> als with the table. Is this correct?

Yes.
With RequestLive set to false the query is going to return a canned result
set and that means that a temporary table must be created and populated,
causing an additional delay.

--
Fernando Dias


Image