Re: [HACKERS] VACUUM ANALYZE is faster than ANALYZE?

2012-02-27 Thread Cédric Villemain
Le mercredi 22 février 2012 20:12:35, Pavel Stehule a écrit : 2012/2/22 Kevin Grittner kevin.gritt...@wicourts.gov: Pavel Stehule pavel.steh...@gmail.com wrote: usual pattern in our application is create table xx1 as select analyze xx1 create table xx2 as select from xx1,

Re: [HACKERS] VACUUM ANALYZE is faster than ANALYZE?

2012-02-25 Thread Cédric Villemain
Le mercredi 22 février 2012 20:12:35, Pavel Stehule a écrit : 2012/2/22 Kevin Grittner kevin.gritt...@wicourts.gov: Pavel Stehule pavel.steh...@gmail.com wrote: usual pattern in our application is create table xx1 as select analyze xx1 create table xx2 as select from xx1,

Re: [HACKERS] VACUUM ANALYZE is faster than ANALYZE?

2012-02-23 Thread Simon Riggs
On Wed, Feb 22, 2012 at 10:02 PM, Robert Haas robertmh...@gmail.com wrote: On Wed, Feb 22, 2012 at 2:23 PM, Simon Riggs si...@2ndquadrant.com wrote: The industry accepted description for non-sequential access is random access whether or not the function that describes the movement is entirely

Re: [HACKERS] VACUUM ANALYZE is faster than ANALYZE?

2012-02-23 Thread Robert Haas
On Thu, Feb 23, 2012 at 3:34 AM, Simon Riggs si...@2ndquadrant.com wrote: On Wed, Feb 22, 2012 at 10:02 PM, Robert Haas robertmh...@gmail.com wrote: On Wed, Feb 22, 2012 at 2:23 PM, Simon Riggs si...@2ndquadrant.com wrote: The industry accepted description for non-sequential access is random

Re: [HACKERS] VACUUM ANALYZE is faster than ANALYZE?

2012-02-22 Thread Robert Haas
On Tue, Feb 21, 2012 at 9:00 AM, Pavel Stehule pavel.steh...@gmail.com wrote: I had to reply to query about usage VACUUM ANALYZE or ANALYZE. I expected so ANALYZE should be faster then VACUUM ANALYZE. But is not true. Why? I'm pretty sure that VACUUM ANALYZE *will* be faster than ANALYZE in

Re: [HACKERS] VACUUM ANALYZE is faster than ANALYZE?

2012-02-22 Thread Nicolas Barbier
2012/2/22 Robert Haas robertmh...@gmail.com: On Tue, Feb 21, 2012 at 9:00 AM, Pavel Stehule pavel.steh...@gmail.com wrote: I had to reply to query about usage VACUUM ANALYZE or ANALYZE. I expected so ANALYZE should be faster then VACUUM ANALYZE. But is not true. Why? I'm pretty sure

Re: [HACKERS] VACUUM ANALYZE is faster than ANALYZE?

2012-02-22 Thread Robert Haas
On Wed, Feb 22, 2012 at 8:13 AM, Nicolas Barbier nicolas.barb...@gmail.com wrote: 2012/2/22 Robert Haas robertmh...@gmail.com: On Tue, Feb 21, 2012 at 9:00 AM, Pavel Stehule pavel.steh...@gmail.com wrote: I had to reply to query about usage VACUUM ANALYZE or ANALYZE. I expected so ANALYZE

Re: [HACKERS] VACUUM ANALYZE is faster than ANALYZE?

2012-02-22 Thread Simon Riggs
On Tue, Feb 21, 2012 at 2:00 PM, Pavel Stehule pavel.steh...@gmail.com wrote: I had to reply to query about usage VACUUM ANALYZE or ANALYZE. I expected so ANALYZE should be faster then VACUUM ANALYZE. VACUUM ANALYZE scans the whole table sequentially. ANALYZE accesses a random sample of data

Re: [HACKERS] VACUUM ANALYZE is faster than ANALYZE?

2012-02-22 Thread Tom Lane
Simon Riggs si...@2ndquadrant.com writes: On Tue, Feb 21, 2012 at 2:00 PM, Pavel Stehule pavel.steh...@gmail.com wrote: I had to reply to query about usage VACUUM ANALYZE or ANALYZE. I expected so ANALYZE should be faster then VACUUM ANALYZE. VACUUM ANALYZE scans the whole table

Re: [HACKERS] VACUUM ANALYZE is faster than ANALYZE?

2012-02-22 Thread k...@rice.edu
On Wed, Feb 22, 2012 at 10:29:56AM -0500, Tom Lane wrote: Simon Riggs si...@2ndquadrant.com writes: On Tue, Feb 21, 2012 at 2:00 PM, Pavel Stehule pavel.steh...@gmail.com wrote: I had to reply to query about usage VACUUM ANALYZE or ANALYZE. I expected so ANALYZE should be faster then

Re: [HACKERS] VACUUM ANALYZE is faster than ANALYZE?

2012-02-22 Thread Jeroen Vermeulen
On 2012-02-22 16:29, Tom Lane wrote: (Snip context) VACUUM ANALYZE consists of two separate passes, VACUUM and then ANALYZE, and the second pass is going to be random I/O by your definition no matter what. I don't suppose there's a case

Re: [HACKERS] VACUUM ANALYZE is faster than ANALYZE?

2012-02-22 Thread Pavel Stehule
2012/2/22 Robert Haas robertmh...@gmail.com: On Wed, Feb 22, 2012 at 8:13 AM, Nicolas Barbier nicolas.barb...@gmail.com wrote: 2012/2/22 Robert Haas robertmh...@gmail.com: On Tue, Feb 21, 2012 at 9:00 AM, Pavel Stehule pavel.steh...@gmail.com wrote: I had to reply to query about usage

Re: [HACKERS] VACUUM ANALYZE is faster than ANALYZE?

2012-02-22 Thread Kevin Grittner
Pavel Stehule pavel.steh...@gmail.com wrote: usual pattern in our application is create table xx1 as select analyze xx1 create table xx2 as select from xx1, analyze xx2 create table xx3 as select ... from xx3, analyze xx3 create table xx4 as select ... from xx1, ...

Re: [HACKERS] VACUUM ANALYZE is faster than ANALYZE?

2012-02-22 Thread Pavel Stehule
2012/2/22 Kevin Grittner kevin.gritt...@wicourts.gov: Pavel Stehule pavel.steh...@gmail.com wrote: usual pattern in our application is create table xx1 as select analyze xx1 create table xx2 as select from xx1, analyze xx2 create table xx3 as select ... from xx3,

Re: [HACKERS] VACUUM ANALYZE is faster than ANALYZE?

2012-02-22 Thread Simon Riggs
On Wed, Feb 22, 2012 at 3:29 PM, Tom Lane t...@sss.pgh.pa.us wrote: Simon Riggs si...@2ndquadrant.com writes: On Tue, Feb 21, 2012 at 2:00 PM, Pavel Stehule pavel.steh...@gmail.com wrote: I had to reply to query about usage VACUUM ANALYZE or ANALYZE. I expected so ANALYZE should be faster

Re: [HACKERS] VACUUM ANALYZE is faster than ANALYZE?

2012-02-22 Thread Robert Haas
On Wed, Feb 22, 2012 at 2:23 PM, Simon Riggs si...@2ndquadrant.com wrote: The industry accepted description for non-sequential access is random access whether or not the function that describes the movement is entirely random. To argue otherwise is merely hairsplitting. I don't think so. For