0

I have a use case where i dynamically add new columns to db.The alter table works fine when no select queries are running on the db table.But if alter query is running at the same time when some heavy (i mean time consuming ) select query is running then alter query waits for the select query to finish.

My data is huge and select query may take a very long time .So the jdbc connections for alter table times out.

How can i go about this problem? Can i some how do this asynchronously? I mean fire alter query to db and break the connection and then let alter query be executed whever db can execute it.

Is this possible. Id i break the jdbc connection is the query execution aborted?

4

0 回答 0