Re: Drop partition while running a query
Hi,
Eric Her Wrote:
-------------------------------------------------------
> Hi
>
> Imagine that you have a table partitioned by range
> and each partition have millions of rows. What
> happen to an ongoing query that "uses" a partition
> and this partition is dropped by another process?
> In which state this query is going to fall? Is it
> canceled automatically or immediately returns an
> empty result set or it falls in a black hole?
>
> Thanks
>
MySQL employs locking in those cases. So the query that
reads the data will ensure that drop partition is blocked
until it's completed. Any queries starting after drop
partition has started will be blocked waiting for the
drop partition to complete. So in both cases no problems
will occur.
At one point queries that are queued waiting for drop partition
could be aborted due to that the meta-data changed so the query
plan would be faulty if they do not abort to reread the table
meta-data.
Rgrds Mikael
> Eric
Subject
Views
Written By
Posted
3752
December 21, 2006 10:21AM
Re: Drop partition while running a query
2155
January 17, 2007 05:39PM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.