We want to avoid dirty read as we have hourly loads & had few clarifications needed before implementing view switch
While the select and view switch macro execute at same exact micro second/same time, what will happen to select query in below situations?
Is changing views lead to risk of system catalogue table locks?
Thanks for your advice!
REPLACE VIEW takes an exclusive rowHash lock on the dictionary. This can momentarily block parsing of a new SELECT request that references the view.
Conversely, any request already parsed using the old view definition has resolved to the internal ID of the old table (and does not hold a lock on the view).
Note that the SELECT requests don't acquire locks until they actually begin executing steps, so it is possible to DROP a table while there are still requests that would use it left in a delay queue; in that case those requests will fail once they are dispatched.