Focal Point
[CLOSED] SQL Tables are updating every Hour

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/6817079726

January 16, 2013, 04:16 PM
Joey Sandoval
[CLOSED] SQL Tables are updating every Hour
We have some reports which are based on a new SQL reporting DB that updates at the top of every hour. We notice that our reports and dashboards seem to lock up and freeze during this time.

How could we fix this performance issue? Should we be using the SQL set command that enables "read uncommitted" in all our procedures in order to always read the database in a timely manner, regardless if it is in the process of updating?

Thank you,

This message has been edited. Last edited by: Joey Sandoval,




Prod/Dev: WebFOCUS 8.0.08 on Windows Server 2008/Tomcat , WebFOCUS DevStudio 8.0.08 on Windows 7 Pro


January 16, 2013, 04:35 PM
Waz
First guess is that the tables may be being locked.


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

January 16, 2013, 05:10 PM
Joey Sandoval
Yes they are being locked. I received this message earlier today.

Microsoft SQL Native Client: [40001] Transaction (Process ID 75) was dea
: dlocked on lock resources with another process and has been chosen as th
: e deadlock victim. Rerun the transaction.

Waz, do you think this is solvable from the WF side? Or do you think our IT group would have to access the update schedule?




Prod/Dev: WebFOCUS 8.0.08 on Windows Server 2008/Tomcat , WebFOCUS DevStudio 8.0.08 on Windows 7 Pro


January 16, 2013, 06:17 PM
Waz
You may have to look at the DB and how its being updated, What sort of locking is being implemented ?


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

January 16, 2013, 07:13 PM
Joey Sandoval
All I know is that IT setup a scheduled replication of the production data every hour.




Prod/Dev: WebFOCUS 8.0.08 on Windows Server 2008/Tomcat , WebFOCUS DevStudio 8.0.08 on Windows 7 Pro


January 16, 2013, 07:25 PM
Waz
I think you should talk to IT about what they have done and impacts of report running against the data. They may have suggestions.


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

January 17, 2013, 03:57 AM
Wep5622
A deadlock error should really only occur if two transactions are trying to modify the same interdependent set of records in different orders. There's absolutely no reason to get a deadlock when you're only reading from a database (MS-SQL is a database based on the MVCC principle, so it should be able to deal with that situation gracefully).

Apparently your reports or dashboards are writing to the database and, apparently, to the same tables that the replication software is trying to update (is that master-slave replication, or master-master?).

Whether that's the intended scenario or whether that's desirable is up to you. I have to say though that I find it highly unusual that reporting software would attempt to modify data in a replicated DB.

That is how it should be according to theory. However, we're talking about a Microsoft product, so none of the above is necessarily true. It's also possible that the MSSQL adapter in WF is doing something it shouldn't.


WebFOCUS 8.1.03, Windows 7-64/2008-64, IBM DB2/400, Oracle 11g & RDB, MS SQL-Server 2005, SAP, PostgreSQL 11, Output: HTML, PDF, Excel 2010
: Member of User Group Benelux :
January 17, 2013, 03:40 PM
Waz
I am reasonably sure that I have seen some record locking cause problems on reads.

As this is some sort of backup, only the IT guys would know what they have done. (Hopefully)


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

January 17, 2013, 04:09 PM
John_Edwards
Oh, updating a table can lock it for read. No doubt about that.

Presumably you have a real need for data that is updated that frequently?

If that is the case you may want to put a table in the middle that you have more control over. Depending on size copying the table to an XFocus table (scheduled task running on the half-mark of each hour) that strictly supports your reports could be an option.

J.



January 17, 2013, 04:50 PM
Joey Sandoval
None of our reports are updating tables, I can promise you that.

John, I like your idea but unfortunately there are way too many tables to schedule copies to webfocus.

Our company is in the logistics sector and our customers demand nearly real time data from our TMS.




Prod/Dev: WebFOCUS 8.0.08 on Windows Server 2008/Tomcat , WebFOCUS DevStudio 8.0.08 on Windows 7 Pro