|
Re: Problem in SQL report [message #603643 is a reply to message #603642] |
Wed, 18 December 2013 03:03 |
cookiemonster
Messages: 13922 Registered: September 2008 Location: Rainy Manchester
|
Senior Member |
|
|
if you're just selecting data then locks aren't the problem.
2 hrs to get data from 5 tables and dump to csv seems like a very long time.
How many csvs are you generating, how many rows go in each and how many rows does the query pull from the DB?
|
|
|
Re: Problem in SQL report [message #603645 is a reply to message #603643] |
Wed, 18 December 2013 03:24 |
devesh5683
Messages: 3 Registered: September 2008 Location: Pune
|
Junior Member |
|
|
Thanks cookiemonster for your reply.
Yes there are only select statements in the script, In the script 13 different csv files are created by selecting and manipulating data. Considering the size of the tables and the select statements, 2 hours time for the script is fine. There is maximum 200 or less rows in each file.
[Updated on: Wed, 18 December 2013 03:26] Report message to a moderator
|
|
|
Re: Problem in SQL report [message #603648 is a reply to message #603645] |
Wed, 18 December 2013 03:29 |
cookiemonster
Messages: 13922 Registered: September 2008 Location: Rainy Manchester
|
Senior Member |
|
|
2hrs is fine to generate 13 csvs with 200 rows or less?
I'd be worried if that took more than 10 minutes or half decent hardware.
I think your DBA is probably right - your script is doing something horribly inefficient.
Most likely you're doing calculations in perl that could be done far more efficiently in sql.
But without details of what the script is doing it's impossible to say for sure.
|
|
|
|
|
Re: Problem in SQL report [message #603655 is a reply to message #603652] |
Wed, 18 December 2013 04:05 |
ThomasG
Messages: 3211 Registered: April 2005 Location: Heilbronn, Germany
|
Senior Member |
|
|
If it's any database related issue, then the database should throw an error.
Are you checking for errors in the perl script and do you log them? Like in this example here, look at all the places where "errstr" is mentioned.
|
|
|
|