logo       

Re: Progress of asynchronous queries: msg#00008

Subject: Re: Progress of asynchronous queries
on 9/15/06 4:18 AM, jtv@xxxxxxxxx purportedly said:

>> I couldn't find anything in the libpq interfaces that identifies the
>> current progress of an
>> asynchronous query as a percentage of the estimated total query time. So,
>> unless I missed
>> something, I would like to file this as a feature request.
>> 
>> The idea behind this, of course, is to show a progress bar in the user
>> interface of the client
>> application as soon as the query takes longer than say 1 second.
> 
> One way to do this would be to use a cursor, and only receive batches of
> (say) a hundred or a thousand rows at a time.  In that case you might not
> even want to bother with asynchronous execution at all.
> 
> It may take some extra work for your program to handle its data in chunks.
>  Then again, for many programs it's not necessary to hold all of a result
> set in memory at the same time.  In that case you may see reduced memory
> usage if you request one chunk of data through a cursor, process it, then
> request the next batch.
> 
> Doing that will take longer overall but give you faster initial response
> time.  If you want to keep the overall time low, and you do a lot of
> processing per batch, you may still want to request your batches
> asynchronously just so your program can process one batch of data while
> the server is retrieving the next.

Using a cursor would only be useful in cases where the data transfer is the
main bottleneck. This may work in situations with fairly straightforward
queries and exceedingly large datasets, but will not work at all with
complex queries that return small datasets. I.e., where the bottleneck is
the query planning/execution phase.

I will add my vote to this feature request. After all, MySQL and MSSql can
do this. I don't know about Oracle, but I would be surprised if it didn't.

Best,

Keary Suska
Esoteritech, Inc.
"Demystifying technology for your home or business"



---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?

               http://archives.postgresql.org



<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Recently Viewed:
boot-loaders.gr...    php.pear.genera...    debugging.valgr...    kde.redhat.user...    text.xml.xsl.ge...    culture.languag...    hardware.microc...    java.servicemix...    redhat.release....    web.zope.plone....    user-groups.lin...    opendarwin.webk...    video.mjpeg.use...    sysutils.bcfg2....    encryption.gpg....    lx-office.devel...    xfree86.forum/2...    mail.mutt.devel...    acpi.devel/2003...    qnx.openqnx.dev...    network.irc.irs...    freebsd.devel.m...   
Home | blog view | USPTO Patent Archive | advertise | OSDir is an inevitable website. super tiny logo

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe