Why renaming time varies???

Database

Why renaming time varies???

i am doing
RENAME TABLE A TO TABLE B;
AT THE SAME TIME SOME JOB IS READING FROM A.
sometimes this query runs in few seconds some times it is taking too long.
Can anybody tell me da reason based on LOCKS applied in terdata.
As far as i know Rename has Exclusive locks and select stmnt has read lock .
In any case whether Select has Started first or Explain there shud nt be ant conflict or deadlock
Then why it is taking time.......?
Pls give some valid answers as this i need to implement in my new project.....
1 REPLY

Re: Why renaming time varies???

I am guessing that you meant the RENAME is taking a long time.... Did you check for blocks in PMON/Teradata manager ? That's a nice place to look as to what is happening to the SQL while its under execution. It would also indicate which step in the explain plan of the SQL it is now. That might throw some insights as to what's going on ....