Page 1 of 1

Explain how to

Posted: Wed Dec 09, 2015 1:01 pm
by sowe
Hi all ,
I've a question, i need optimize a query and i don't know how?. Normally i use explain instruction but the result is too confused [http://pastebin.com/KbCB0uuH and the query http://pastebin.com/fnm4KJQZ]. I read the documentation but need help to understand the bottleneck.
Any idea? other tool aside explain?
Thanks alot

Re: Explain how to

Posted: Wed Dec 09, 2015 11:24 pm
by JimKnicely
Hi,

First, please run statistics on the tables. Your plan shows that you have NO STATISTICS.

Use the following command to update your stats for the entire DB:

Code: Select all

SELECT analyze_statistics('');

Re: Explain how to

Posted: Fri Dec 11, 2015 1:15 pm
by sowe
Hi JimKnicely,
i run the instruction and follow the documentation https://my.vertica.com/docs/5.0/HTML/Master/16384.htm and https://my.vertica.com/docs/5.0/HTML/Master/14149.htm
http://pastebin.com/BvWRNXxQ
Thanks for all
JimKnicely wrote:Hi,

First, please run statistics on the tables. Your plan shows that you have NO STATISTICS.

Use the following command to update your stats for the entire DB:

Code: Select all

SELECT analyze_statistics('');