On 9/18/07 5:00 AM, "Zbigniew Baniewski" <[EMAIL PROTECTED]> wrote:
> An interesting method is "progress":
>
> "The progress callback can be used to display the status of a lengthy query
> or to process GUI events during a lengthy query."
>
> But I'm not quite sure presently, how it could look like in practice? To make
> a "progress bar" I've got to know a maximal value of the records (table
> rows) involved in a query BEFORE it'll be caused to run.
>
> Perhaps again I've missed some simple thing(?) - but currently I don't know,
> how can it be done in a simple way. The methods "changes" and "total_changes"
> are giving the number or rows involved AFTER the query is done. So, how can
> I count it all before, to make a nice looking progress bar? Just by making
> additional, earlier query like "SELECT COUNT(*) FROM xyz WHERE <condition>"?
Yes, this could be one way to find the max value, but is feasible as long as
we can afford the time taken to execute the query.
One more way I would suggest is that, you could predict average number
records your query would retrieve in all circumstances. Just a suggestion
:-). It works well for me.
-----------------------------------------------
Robosoft Technologies - Come home to Technology
Disclaimer: This email may contain confidential material. If you were not an
intended recipient, please notify the sender and delete all copies. Emails to
and from our network may be logged and monitored. This email and its
attachments are scanned for virus by our scanners and are believed to be safe.
However, no warranty is given that this email is free of malicious content or
virus.
-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------