Deletes slow down queries

Moderator: NorbertKrupa

Post Reply
jenellis
Newbie
Newbie
Posts: 3
Joined: Fri Aug 29, 2014 8:20 pm

Deletes slow down queries

Post by jenellis » Fri Aug 29, 2014 8:41 pm

Hi! Thanks for the forums site!

We are having an issue with deletes. We need to delete a lot of data from tables once a week. It seems like the more we delete, queries against these tables get slower and slower. Is it better to truncate a table and reload only the data we want?

Thank for any help on this.

-J

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

Re: Deletes slow down queries

Post by NorbertKrupa » Fri Aug 29, 2014 10:28 pm

If you don't know already, when a row is deleted in Vertica, it isn't actually removed from physical storage (it's marked for deletion until the epoch advances). These operations take place in WOS and overflow to ROS if they do not fit in memory. If possible, the best practice is to use partitions and drop the entire partition. In your case, you may be able to partition on week and drop the week's partition.

Here are some resources:
Checkout vertica.tips for more Vertica resources.

jenellis
Newbie
Newbie
Posts: 3
Joined: Fri Aug 29, 2014 8:20 pm

Re: Deletes slow down queries

Post by jenellis » Tue Sep 02, 2014 5:58 pm

Thanks for the valuable links!

Post Reply

Return to “New to Vertica”