Reputation: 31
I want to execute some SELECT statements to get some data out of an application database (production environment, not test), can I cause any permanent damage?
I've heard its not recommended to use SELECT * because it slows things down etc. but I assume there is nothing that could be affected in the long run? Can it somehow impair the application performance for the users of the application for more then possibly a few seconds?
Upvotes: 2
Views: 1147
Reputation: 1270091
You can't really cause permanent damage. A run-away query could prevent other people from accessing the database, because it ties up resources. It could also fill up temporary space, shared among all users.
But, you would have to have quite complicated queries to accomplish such things. Merely putting select *
is an otherwise well-performing query will not cause such problems.
You should consider two things. First, understand execution plans so you can get an idea of how the database really works and how each query will be executed. Second, ask for a smaller database with sample data so you can play around and have less chance of interfering with others.
Upvotes: 3