HI,
Can a user lock a table in vertica?
As Oracle having the syntax as follows
Lock table <Table_Name> Exclusive Mode ;
Do Vertica have this kind of facility??
Thanks,
Raj!!
Can we Lock Table??
Moderator: NorbertKrupa
-
- Intermediate
- Posts: 87
- Joined: Wed Apr 25, 2012 8:10 am
Can we Lock Table??
Rajasekhar.T|HP ATP Vertica Big Data Solutions V1
- JimKnicely
- Site Admin
- Posts: 1825
- Joined: Sat Jan 21, 2012 4:58 am
- Contact:
Re: Can we Lock Table??
Hi,
You can use the LOCK TABLE <<table_name>>; command to lock a table in Vertica.
This will issue a "X" exclusive lock on table. You can check this in the LOCKS system table.
You can use the LOCK TABLE <<table_name>>; command to lock a table in Vertica.
This will issue a "X" exclusive lock on table. You can check this in the LOCKS system table.
Jim Knicely
Note: I work for Vertica. My views, opinions, and thoughts expressed here do not represent those of my employer.
Note: I work for Vertica. My views, opinions, and thoughts expressed here do not represent those of my employer.
Re: Can we Lock Table??
The LOCK TABLE statement isn't in the documentation. Personally I wouldn't rely on anything that isn't documented.
You can get an X lock in a supported way using SELECT … FOR UPDATE.
You can get an X lock in a supported way using SELECT … FOR UPDATE.
Sharon Cutter
Vertica Consultant, Zazz Technologies LLC
Vertica Consultant, Zazz Technologies LLC
- JimKnicely
- Site Admin
- Posts: 1825
- Joined: Sat Jan 21, 2012 4:58 am
- Contact:
Re: Can we Lock Table??
C'mon! Live a little. Using an undocumented feature is certainly more exciting than boring documented features Just kidding. I think Vertica included the LOCK TABLE command to be compatible with Oracle.
Jim Knicely
Note: I work for Vertica. My views, opinions, and thoughts expressed here do not represent those of my employer.
Note: I work for Vertica. My views, opinions, and thoughts expressed here do not represent those of my employer.