Re: Returning results while the query is executing

From: mountain man <hobbit_at_southern_seaweed.com.op>
Date: Wed, 01 Oct 2003 04:56:22 GMT
Message-ID: <W7teb.131218$bo1.25078_at_news-server.bigpond.net.au>


"san" <sans11_at_hotmail.com> wrote in message news:8e29a54a.0309282046.609f48f9_at_posting.google.com...
> "mountain man" <hobbit_at_southern_seaweed.com.op> wrote in message
news:<iHvcb.122136$bo1.33845_at_news-server.bigpond.net.au>...
> > "san" <sans11_at_hotmail.com> wrote in message
> > news:8e29a54a.0309242021.1b3d4cd4_at_posting.google.com...
> > > Hi,
> > >
> > > I wanted to know if this is possible and if so, how do I
> > > do it. Say, I have a query "SELECT * FROM Table WHERE
> > > Column="some_value". This executes on a very large data
> > > set and I would like to return the results as they query
> > > executes rather than wait for the whole query to execute.
> > > Basically, I want to get the results as they are prepared
> > > by the database. Any way to do this?
> > >
> > > Regards,
> > > San
> >
> >
> > Use a CURSOR methodology which reads each
> > or a group of the input rows one at a time, and if
> > some value is detected, writes the results to a table.
> >
> > Periodically query the table for updates.
> >
> >
> > But it is slower.
> > Much slower.
> >
> > Is this a one-off task, or is it to be queued
> > as a repetitive cyclic task?
>
>
> Hi,
>
> My question is: Are the results of the query returned as they are
> processed? That is, as the database engine constructs the result it
> returns them (without waiting for the rest of the results to be
> generated)?

If you use a CURSOR, and select records in batches, and write records in batches, how can it not? Have you looked up 'cursor' in the query language documentation?

The results are returned in batches which correspond to your use of the cursor. If you wish to see these results incrementally accumulating then query the table being written. Received on Wed Oct 01 2003 - 06:56:22 CEST

Original text of this message