Subject | Re: Aborting isc_dsql_execute calls from another thread (Win32) |
---|---|
Author | Adam |
Post date | 2006-03-23T03:19:25Z |
--- In firebird-support@yahoogroups.com, Richard Wesley
<hawkfish@...> wrote:
statement or a group by statement that can not use an index. A
statement that ordered by a non indexed field would need to read
every record (and possibly join tables) before returning the first
record.
Adam
<hawkfish@...> wrote:
>background
>
> On Mar 22, 2006, at 13:13, Alan McDonald wrote:
>
> >> If I am executing a select query via isc_dsql_execute in a
> >> thread under Windows, what is the best way to abort theexecution if
> >> the user cancels the operation in a foreground thread? Can Iissue a
> >> rollback on the transaction? Do I just orphan the executionthread
> >> until it completes? Or is there some other mechanism?slow
> >>
> >> TIA,
> >> ________________________________________________________
> >> Richard Wesley Software Engineer
> >
> > how are you fetching the rows? you can fetch in a loop and
> > interrupt the
> > loop, then rollback the transaction.
>
> I guess the question is "Where is all the time spent executing a
> query"? I had assumed that all Fetch did was read a data streamthat
> had already been created. Is that not the case?Another thought. Is it a simple query or do you have an order by
statement or a group by statement that can not use an index. A
statement that ordered by a non indexed field would need to read
every record (and possibly join tables) before returning the first
record.
Adam