Skip to content
DataMiner DoJo

More results...

Generic selectors
Exact matches only
Search in title
Search in content
Post Type Selectors
Search in posts
Search in pages
Search in posts
Search in pages
Log in
Menu
  • Blog
  • Questions
  • Learning
    • E-learning Courses
    • Open Classroom Training
    • Certification
      • DataMiner Fundamentals
      • DataMiner Configurator
      • DataMiner Automation
      • Scripts & Connectors Developer: HTTP Basics
      • Scripts & Connectors Developer: SNMP Basics
      • Visual Overview – Level 1
      • Verify a certificate
    • Tutorials
    • Video Library
    • Books We Like
    • >> Go to DataMiner Docs
  • Expert Center
    • Solutions & Use Cases
      • Solutions
      • Use Case Library
    • Markets & Industries
      • Media production
      • Government & defense
      • Content distribution
      • Service providers
      • Partners
      • OSS/BSS
    • DataMiner Insights
      • Security
      • Integration Studio
      • System Architecture
      • DataMiner Releases & Updates
      • DataMiner Apps
    • Agile
      • Agile Webspace
      • Everything Agile
        • The Agile Manifesto
        • Best Practices
        • Retro Recipes
      • Methodologies
        • The Scrum Framework
        • Kanban
        • Extreme Programming
      • Roles
        • The Product Owner
        • The Agile Coach
        • The Quality & UX Coach (QX)
    • DataMiner DevOps Professional Program
  • Downloads
  • More
    • Feature Suggestions
    • Climb the leaderboard!
    • Swag Shop
    • Contact
      • General Inquiries
      • DataMiner DevOps Support
      • Commercial Requests
    • Global Feedback Survey
  • PARTNERS
    • All Partners
    • Technology Partners
    • Strategic Partner Program
    • Deal Registration
  • >> Go to dataminer.services

DM 10.1 MySQL Delete query

Solved1.09K views12th July 2023MySQL
2
Jeff Douglass860 13th September 2022 1 Comment

In DM 10.1 CU16 I am seeing the following MySQL query in workbench all the time on my larger system that has me concerned. I am very familiar with the DM database cleaning process in 9.6 and have not seen this particular query in my 9.6 systems. In 9.6 systems the Delete query is not a JOIN statement like below and they timeout and get canceled after 1800 sec. This DM 10.1 Query with the Join is running for 3600sec. Questions:

  1. Is this new expected behavior in DM10
  2. Is there a chance that this will be more problematic that how 9.6 works

I am getting ready to upgrade a system with large database from 9.6 to 10.1 and want to know if I should hold off until Skyline Engineering can take a look at this to see if it is a problem.

Thanks

DELETE a FROM dataavg_31856_7217 a
LEFT OUTER JOIN (
SELECT iPid, iStatus, chIndex, max(iiD) m from dataavg_31856_7217 WHERE (iStatus < 0 AND dtFirst < '2021-09-08 13:45:33') OR
((iStatus = 5 AND dtFirst < '2022-08-09 13:45:33') OR
(iStatus = 60 AND dtFirst < '2021-09-08 13:45:33') OR
(iStatus = 120 AND dtFirst < '2021-09-08 13:45:33'))
GROUP BY iPid ,chIndex, iStatus
) as b
on a.iPid = b.iPid AND a.chIndex = b.chIndex and a.iStatus = b.iStatus
WHERE ((a.iStatus < 0 AND a.dtFirst < '2021-09-08 13:45:33') OR
(a.iStatus = 5 AND a.dtFirst < '2022-08-09 13:45:33') OR
(a.iStatus = 60 AND a.dtFirst < '2021-09-08 13:45:33') OR
(a.iStatus = 120 AND a.dtFirst < '2021-09-08 13:45:33')) AND b.m != a.iiD

Marieke Goethals [SLC] [DevOps Catalyst] Selected answer as best 12th July 2023
Marieke Goethals [SLC] [DevOps Catalyst] commented 12th July 2023

As this question has been inactive for a long time, we will now close it. If you want further assistance, feel free to post a new question or contact techsupport@skyline.be.

1 Answer

  • Active
  • Voted
  • Newest
  • Oldest
3
Brent Alleweireldt [SLC]1.53K Posted 13th September 2022 1 Comment

Hi Jeff,

I had a look at the code and it seems no changes where done between the versions mentioned. The query you posted should occur on both 9.6 and 10.1 so whilst not new it is definitely expected behaviour. The query should occur every hour for every element in the system.

I am not entirely sure where the difference would come from between 9.6 and 10.1 aside from some versions containing issues in generating the query. Since this is part of the cleaning routine for average trending I would suspect that having it run would cause less issues than when it is missing.

Kind regards,

Marieke Goethals [SLC] [DevOps Catalyst] Selected answer as best 12th July 2023
Jeff Douglass commented 13th September 2022

Thank you for your response Brent. Strange I have not seen this before on my 9.6 systems and I been spending considerable amounts of time recently looking at this stuff. Follow up questions:
1) I am seeing this query run for 3600 sec and then disappear. I assume this is because it is not finishing within the allotted 60 min so DM cancels the query just like is does on the basic (non Join) delete statements were they timeout after 1800sec (30Min). Is this a correct assumption?
2) If my assumption above is correct what is the side affect of this? Does this effectively mean that the database is NOT getting cleaned out since the statement take too long? I know this is the case with the basic (non Join) delete statements after 30min and can be seen as error statements in the SLDBConnection log file (Below is a snip it from my DM10 system)

2022/09/13 11:07:39.022|SLDBConnection|SQLCleaning.RunThreadFunc|ERR|0|124|Error occurred in SQLCleaningThread: MySql.Data.MySqlClient.MySqlException (0x80004005): Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding. —> System.TimeoutException: Unable to read data from the transport connection: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond. —> System.IO.IOException: Unable to read data from the transport connection: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond. —> System.Net.Sockets.SocketException: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond
at System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 size)
— End of inner exception stack trace —
at System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 size)
at MySql.Data.Common.MyNetworkStream.Read(Byte[] buffer, Int32 offset, Int32 count)
— End of inner exception stack trace —
at MySql.Data.Common.MyNetworkStream.Read(Byte[] buffer, Int32 offset, Int32 count)
at MySql.Data.MySqlClient.TimedStream.Read(Byte[] buffer, Int32 offset, Int32 count)
at System.IO.BufferedStream.Read(Byte[] array, Int32 offset, Int32 count)
at MySql.Data.MySqlClient.MySqlStream.ReadFully(Stream stream, Byte[] buffer, Int32 offset, Int32 count)
at MySql.Data.MySqlClient.MySqlStream.LoadPacket()
at MySql.Data.MySqlClient.MySqlStream.ReadPacket()
at MySql.Data.MySqlClient.NativeDriver.GetResult(Int32& affectedRow, Int64& insertedId)
at MySql.Data.MySqlClient.Driver.NextResult(Int32 statementId, Boolean force)
at MySql.Data.MySqlClient.MySqlDataReader.NextResult()
at MySql.Data.MySqlClient.MySqlCommand.ExecuteReader(CommandBehavior behavior)
at MySql.Data.MySqlClient.ExceptionInterceptor.Throw(Exception exception)
at MySql.Data.MySqlClient.MySqlConnection.HandleTimeoutOrThreadAbort(Exception ex)
at MySql.Data.MySqlClient.MySqlCommand.ExecuteReader(CommandBehavior behavior)
at MySql.Data.MySqlClient.MySqlCommand.ExecuteNonQuery()
at Skyline.DataMiner.SLDatabase.SLMySQL.ExecuteNonQuery(MySqlConnection conn, String sql, Int32 timeOut)
at Skyline.DataMiner.SLDatabase.SLMySQL.CleanAverageDataTable(String id, DateTime range5min, DateTime range1Hour, DateTime range1Day, Boolean partitioned)

Thanks again

You are viewing 1 out of 1 answers, click here to view all answers.
Please login to be able to comment or post an answer.

My DevOps rank

DevOps Members get more insights on their profile page.

My user earnings

0 Dojo credits

Spend your credits in our swag shop.

0 Reputation points

Boost your reputation, climb the leaderboard.

Promo banner DataMiner DevOps Professiona Program
DataMiner Integration Studio (DIS)
Empower Katas

Recent questions

Web Applications exception in Cube due to invalid certificate 0 Answers | 0 Votes
Redundancy Groups and Alarming – Duplicate Alarms 0 Answers | 0 Votes
Correlation Engine: “Test rule” doesn’t result in a hit, despite functional rule 1 Answer | 3 Votes

Question Tags

adl2099 (115) alarm (62) Alarm Console (82) alarms (100) alarm template (83) Automation (223) automation scipt (111) Automation script (167) backup (71) Cassandra (180) Connector (109) Correlation (69) Correlation rule (52) Cube (151) Dashboard (194) Dashboards (188) database (83) DataMiner Cube (57) DIS (81) DMS (71) DOM (140) driver (65) DVE (56) Elastic (83) Elasticsearch (115) elements (80) Failover (104) GQI (159) HTTP (76) IDP (74) LCA (152) low code app (166) low code apps (93) lowcodeapps (75) MySQL (53) protocol (203) QAction (83) security (88) SNMP (86) SRM (337) table (54) trending (87) upgrade (62) Visio (539) Visual Overview (345)
Privacy Policy • Terms & Conditions • Contact

© 2025 Skyline Communications. All rights reserved.

DOJO Q&A widget

Can't find what you need?

? Explore the Q&A DataMiner Docs

[ Placeholder content for popup link ] WordPress Download Manager - Best Download Management Plugin