Re: query progress bar

Timothy Smith <timothy-/[email protected]> Wed, 18 May 2005 07:49:14 +1000
Newsgroups gmane.comp.python.db.pypgsql.user
Message-ID <[email protected]>
Karsten Hilbert wrote:

>On Tue, May 17, 2005 at 09:01:14AM +1000, Timothy Smith wrote:
>  
>
>>is it possible to mke a progress bar for queries? say i have a query 
>>that will take 20 seconds, i'd like to give some feed back to users on 
>>how long this will take.
>>    
>>
>It is sure possible but it is not very useful because
>
>- you will need the number of rows in the result
>- which could be gotten by "select count(*) from ... where ..."
>- which, however, takes pretty much the same time as the query itself
>- which is in part due to PostgreSQL's MVCC nature
>- which cannot be sped up by using an index
>- because current tuple visibility is not stored in the index 
>- and doing so would create overhead for insert/update
>
>Karsten
>  
>
it's a very useful feature, however as you pointed out it'd be almost 
impossible to implement


-------------------------------------------------------
This SF.Net email is sponsored by Oracle Space Sweepstakes
Want to be the first software developer in space?
Enter now for the Oracle Space Sweepstakes!
http://ads.osdn.com/?ad_id=7412&alloc_id=16344&op=click