RefreshQuick Bug

Discussion of open issues, suggestions and bugs regarding MyDAC (Data Access Components for MySQL) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
Zsolt Csillag
Posts: 30
Joined: Sun 28 May 2006 16:09

RefreshQuick Bug

Post by Zsolt Csillag » Sun 05 Jul 2009 21:20

Hello,


I have run into this problem a long time ago but now I decided to write since it is very annoying not only for me but for the customer as well.

The situation is as follows:

- Sometimes I need to update a table that has more than 10 000 records
for example update table1 set price=500;

- In this case the timestamp of every row is be the same (of course)

- when the next RefreshQuick occurs it will take between 30 to 90 minutes to refresh !!!


So the same thing that took a moment before now it is an hour. No wonder the customer presses Ctrl+Alt+Del after the first minute.
For him it is freezing.

Have you got any idea?

Thank you very much

Challenger
Devart Team
Posts: 925
Joined: Thu 17 Nov 2005 10:53

Post by Challenger » Tue 07 Jul 2009 13:45

The RefreshQuick method is more efficient than simple refresh when you are refreshing a small subset of records. Maybe you should consider using the Refresh method.

Zsolt Csillag
Posts: 30
Joined: Sun 28 May 2006 16:09

Post by Zsolt Csillag » Tue 07 Jul 2009 17:04

The RefreshQuick method normally works very well EXCEPT in the situation I described.

1. I cannot guess in advance that there will be an update for all records and use Refresh afterwords

2.You said that "The RefreshQuick method is more efficient than simple refresh when you are refreshing a small subset of records. "

I think if I have a small subset of records, it doesn't matter if I use Refresh or RefreshQuick, both are very fast (because of the small subset of records).
I think the point is when I have many records then it does matter which one I choose.

And I have tested it: when I have a large number of records (as in my example) then RefreshQuick is MUCH FASTER than Refresh.
So I can't see any reason why not to use RefreshQuick.

I only stated that there must be a bug in RefreshQuick (see my first post).

Maybe it could be solved that if there are a number of equal timestamps, then it would internally call Refresh instead. (just an idea).


Thank you
[/quote]

Dimon
Devart Team
Posts: 2910
Joined: Mon 05 Mar 2007 16:32

Post by Dimon » Mon 20 Jul 2009 09:47

As you have noticed, the RefreshQuick method in most cases works considerably faster than Refresh. But in some cases it works slower than Refresh. We can not change this behaviour because it depends on many parameters such as speed of the connection, time of query executing on server, field count, etc.
To solve the problem try to set the TMemDataSet.IndexFieldNames property by using the RefreshQuick method.

Post Reply