Hello,
I've inherited a web service on a Windows server that connects to a Postgres database. There is a "SELECT * FROM" query below that runs a long time and appears to happen whenever there is a web service update. I'd like to eliminate or limit it but I have to find it first. I have pgBadger set up and logging turned up which is how I found the query.
The developer says the query is not in his code and gave me the source code. It's pasqual. I see the other queries but I don't see the select * either in the code. He also added logging of the queries and the SELECT * FROM is missing. Is it possible another query creates the select * such as the two queries before it shown below?
These are all part of the same connection [2308] and I can see the connection and disconnect each time. Can I safely assume this is all the same connection and must be coming from the same web service code/program?
Any help would be greatly appreciated.
Thanks,
Andrew
2013-12-09 00:48:15 EST [2308]: [21-1] user=phoneworks,db=phoneworks LOG: duration: 33.032 ms statement: Update cout4424ord set deliverbyopr='C' Where col_id In (17403)
2013-12-09 00:48:15 EST [2308]: [22-1] user=phoneworks,db=phoneworks LOG: duration: 4.047 ms statement: Select Count(col_id) from cout4424ord Where deliverbyopr<>'C' OR deliverbyopr IS NULL
2013-12-09 00:48:16 EST [2308]: [23-1] user=phoneworks,db=phoneworks LOG: duration: 905.426 ms statement: SELECT * FROM cout4424ord