Explain how to

Moderator: NorbertKrupa

Post Reply
sowe
Newbie
Newbie
Posts: 11
Joined: Thu Jul 02, 2015 8:43 pm

Explain how to

Post by sowe » Wed Dec 09, 2015 1:01 pm

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

User avatar
JimKnicely
Site Admin
Site Admin
Posts: 1825
Joined: Sat Jan 21, 2012 4:58 am
Contact:

Re: Explain how to

Post by JimKnicely » Wed Dec 09, 2015 11:24 pm

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('');
Jim Knicely

Image

Note: I work for Vertica. My views, opinions, and thoughts expressed here do not represent those of my employer.

sowe
Newbie
Newbie
Posts: 11
Joined: Thu Jul 02, 2015 8:43 pm

Re: Explain how to

Post by sowe » Fri Dec 11, 2015 1:15 pm

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('');

Post Reply

Return to “New to Vertica SQL”