Re: Optional skipping of unchanged relations during ANALYZE? - Mailing list pgsql-hackers

From Sami Imseih
Subject Re: Optional skipping of unchanged relations during ANALYZE?
Date
Msg-id CAA5RZ0s-akwQTy5bBTVBgSHB9Sy-6jS7eFZXqLcTbvL13pb8eA@mail.gmail.com
Whole thread Raw
In response to Re: Optional skipping of unchanged relations during ANALYZE?  (VASUKI M <vasukianand0119@gmail.com>)
Responses Re: Optional skipping of unchanged relations during ANALYZE?
List pgsql-hackers
Hi,

> I would appreciate feedback on the overall approach.

I did not read through the patch in detail but by looking at the commit
message:

"A relation is skipped only if:
- it has been analyzed before (manual or auto-analyze), and
- n_mod_since_analyze == 0

Relations that have never been analyzed are always analyzed normally.
The default ANALYZE behavior is unchanged unless SMART is explicitly
specified.
"

I can't help but think that this SMART option is not as smart as it
should be to actually
be valuable.

I agree that we should never skip a table that has never been
analyzed. My concern
is that n_mod_since_analyze == 0 is not very useful. What if I modify
1 tuple? does
that really justify an ANALYZE to run on the table? Shouldn't the
decision be driven based
on some threshold calculation; similar to how autoanalyze makes the decision?


--
Sami Imseih
Amazon Web Services (AWS)



pgsql-hackers by date:

Previous
From: Álvaro Herrera
Date:
Subject: Re: Race conditions in logical decoding
Next
From: Pierre Ducroquet
Date:
Subject: Re: [PATCH] llvmjit: always add the simplifycfg pass