I removed a node from the database and now my query runs fas

Moderator: NorbertKrupa

Post Reply
NorbertKrupa
GURU
GURU
Posts: 527
Joined: Tue Oct 22, 2013 9:36 pm
Location: Chicago, IL
Contact:

Re: I removed a node from the database and now my query runs

Post by NorbertKrupa » Tue Mar 11, 2014 4:37 pm

Could you additionally just post the EXPLAIN output? That should be enough to show what's happening with the JOINs. My initial reaction is that your data was segmented across more nodes, and lowering the number of nodes increases the performance since. Seeing the projections for each table would help as well.
Checkout vertica.tips for more Vertica resources.

NorbertKrupa
GURU
GURU
Posts: 527
Joined: Tue Oct 22, 2013 9:36 pm
Location: Chicago, IL
Contact:

Re: I removed a node from the database and now my query runs

Post by NorbertKrupa » Tue Mar 11, 2014 6:59 pm

Few things I noticed
  • Missing statistics; you can fix this by running SELECT ANALYZE_STATISTICS('schema.table');
  • A RESEGMENT indicates that the projections are segmented and are likely performing a network join. If you have small tables being joined, consider replicating them to allow for local joins. Make sure to use PK and FK's where possible to help the optimizer. More on optimizing joins
  • See if you can optimize your GROUP BY HASH for a GROUP BY PIPE
  • Consider the encodings on your projections. There's a few columns that have to be materialized.
Checkout vertica.tips for more Vertica resources.

Post Reply

Return to “Vertica SQL”