Skip to main content

analyze_statistics vs analyze_histogram

  • June 20, 2017
  • 5 replies
  • 12 views

sreeblr
Forum|alt.badge.img+2

After loading a table with significant volume >50 % the recommendation as per vertica manuals is to run analyze_statistics which take 10 pct sample. Is this enough or should we run analyze_histogram. What should be ideal sample percent (1-100) ? Also does vertica automatically run analyze_statistics after purge /delete or on any other trigger?

5 replies

TomM
Forum|alt.badge.img
  • Participating Frequently
  • June 20, 2017

Pretty sure analyze_histogram has been deprecated and analyze_statistics has been updated. I'll take a look at the docs and see what I can find.


TomM
Forum|alt.badge.img
  • Participating Frequently
  • June 20, 2017

sreeblr
Forum|alt.badge.img+2
  • Author
  • Participating Frequently
  • June 21, 2017

we are using vertica 7.1 hence using analyze_histogram


Forum|alt.badge.img+2
  • Participating Frequently
  • June 23, 2017

Analyze_statistics should suffice and to you question "does vertica automatically run analyze_statistics after purge /delete or on any other trigger" , answer is no. You have to issue analyze_statistics, if there are significant changes.


drlove
Forum|alt.badge.img
  • Participating Frequently
  • June 23, 2017

Analyze_Statistics and Analyze_Histogram do the exact same thing except Analyze_Histogram gave you the ability of changing the fixed 10% to any other percentage in Versions through 7.2. After 7.2, Analyze_Statistics has the percent option. And as @skamat mentioned above, you should be fine with Analyze_Statistics and no it does not automatically run, you must instruct Vertica to run it. It is recommended you run it any time your data has changed significantly as you mentioned.