need suggestion on tuning this query

Moderator: NorbertKrupa

Post Reply
potluri27
Newbie
Newbie
Posts: 8
Joined: Thu Sep 13, 2012 5:43 am

need suggestion on tuning this query

Post by potluri27 » Thu Sep 13, 2012 5:50 am

Hi,

i have a problematic query which originally doesnot finish at all.
then i created query specific projection for "dwh" schema, after which this query takes 83 mins.

i need to further tune this query and need some advises and recommendations.

i am attaching the following :-
1) query
2) explain plan
3) schema export
4) design1_dwh_Deploy
5) design2_dwh_deploy

please help me .

thanks and regards,
Srikanth
Attachments
Query.rar
(70.78 KiB) Downloaded 590 times

scutter
Master
Master
Posts: 302
Joined: Tue Aug 07, 2012 2:15 am

Re: need suggestion on tuning this query

Post by scutter » Thu Sep 13, 2012 2:38 pm

In the explain plan that you posted, there are lots of NO STATISTICS. Be sure to update the statistics using analyze_statistics before you run Database Designer. And if you see NO STATISTICS or STALE STATISTICS in any explain plan, update the stats then too.

After updating the stats and doing another query-specific design, if the query still isn't performing well, post another explain plan and the design. We may need to see profiling data too, but start with the explain plan.

--Sharon
Sharon Cutter
Vertica Consultant, Zazz Technologies LLC

zvika
Beginner
Beginner
Posts: 25
Joined: Thu Apr 19, 2012 7:55 am

Re: need suggestion on tuning this query

Post by zvika » Fri Sep 14, 2012 12:16 pm

potluri27 wrote:Hi,

i have a problematic query which originally doesnot finish at all.
then i created query specific projection for "dwh" schema, after which this query takes 83 mins.

i need to further tune this query and need some advises and recommendations.

i am attaching the following :-
1) query
2) explain plan
3) schema export
4) design1_dwh_Deploy
5) design2_dwh_deploy

please help me .

thanks and regards,
Srikanth
Hi,

As scutter wrote start with analyze all tables.

Then break the query into blocks and test each block time .

You can break it at start with all the union all queries.

Try to get as small query as possible so you will be able to see the part that take the most time and resources .

Then try to see in each query where is the bottleneck and focus on one .

I'm pretty sure that once you will solve one block the solution will be the same for all others blocks.

try to see which part in the explain taking the most time and resource .

use trace to see where it get stuck and focus on that area.

Good luck.

Post Reply

Return to “Vertica Performance Tuning”