I am trying to change a long varchar into a varchar(1024) - the largest value currently is 187 characters long but may go beyond the 255 mark.
There are 32,652,451 but as the alter statement has now been rolling on for 6 hours I'm a little concerned. It has three projections including the super.
The machine has 12gigs of RAM and 12 cores, not heavily used otherwise.
Should I be taking any actions on this or let it stay the course?
Slow alter column
Moderator: NorbertKrupa
-
- GURU
- Posts: 527
- Joined: Tue Oct 22, 2013 9:36 pm
- Location: Chicago, IL
- Contact:
Re: Slow alter column
I probably would have created a new column, used COPY to go from original to new, then dropped the original.
Have you checked if the request is still running through query_requests?
Have you checked if the request is still running through query_requests?
Checkout vertica.tips for more Vertica resources.
-
- Newbie
- Posts: 2
- Joined: Fri Jan 30, 2015 6:02 am
Re: Slow alter column
Tracking on the drop and add approach - sounds like that would have been better.
No sign of it in query_requests, but it shows up in sessions (select statement_id,session_id,client_hostname,current_statement from sessions where current_statement <> '';).
There is no statement_id in the sessions table for it so I tried killing the session - this disconnected the client which started the query but it didn't change in the sessions table and is still slamming all my CPUs.
No sign of it in query_requests, but it shows up in sessions (select statement_id,session_id,client_hostname,current_statement from sessions where current_statement <> '';).
There is no statement_id in the sessions table for it so I tried killing the session - this disconnected the client which started the query but it didn't change in the sessions table and is still slamming all my CPUs.
-
- GURU
- Posts: 527
- Joined: Tue Oct 22, 2013 9:36 pm
- Location: Chicago, IL
- Contact:
Re: Slow alter column
I'm not sure if I would let it run for that long even though it's working on long varchar's.
Checkout vertica.tips for more Vertica resources.