Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (Flatly)
  • No Skin
Collapse
Brand Logo

NetXMS Forum

  1. Home
  2. Support
  3. NETXMS Query taking too much resources

NETXMS Query taking too much resources

Scheduled Pinned Locked Moved Support
5 Posts 2 Posters 16.6k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • I
    I
    isoftcom
    wrote on last edited by
    #1

    Hi All,

    The Query "INSERT INTO tdata_122 (item_id,tdata_timestamp,record_id) VALUES (:1,:2,:3)" is very expensive, it causes all sorts of problems with the Database including the creation of deadlocks and waits. Isn't there a way we can optimize it so as to make is less expensive on resources.

    1 Reply Last reply
    0
    • A
      A
      Alex Kirhenshtein
      wrote on last edited by
      #2

      It's simple insert with 3 field and single composite index, it should not be expensive.
      Please show explain / query plan.
      What DB you are using?
      How many objects in the system?
      How big the database is?
      What is retention time for tables DCIs on node 122?

      1 Reply Last reply
      0
      • I
        I
        isoftcom
        wrote on last edited by
        #3

        I understand that the tdata_ table holds the DCI value history, my database is big with a lot of objects in the system sitting on oracle 11g database. The problem is the value history are alot and are taking a lot of resources when pushing these history to the database. Is there way on how to tell netxms not to generate a lot of these history?

        1 Reply Last reply
        0
        • A
          A
          Alex Kirhenshtein
          wrote on last edited by
          #4

          @isoftcom said in NETXMS Query taking too much resources:

          Is there way on how to tell netxms not to generate a lot of these history?

          Sure.

          1. Increase collection interval for the table DCI (it's once a minute by default)
          2. Decrease retention time for the table DCI (1 month by default)

          You can change these settings per-DCI.

          To find out which DCI consume most of the space, you can query table in question:

          select item_id,count(*) c from tdata_122 group by item_id order by c desc;
          

          ID is the same as shown in data collection editor for the node

          1 Reply Last reply
          0
          • I
            I
            isoftcom
            wrote on last edited by
            #5

            Hi Alex

            Thanks for the Help, let me try to do what you have advised and monitor the difference.

            1 Reply Last reply
            0

            Hello! It looks like you're interested in this conversation, but you don't have an account yet.

            Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

            With your input, this post could be even better 💗

            Register Login
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            Powered by NodeBB Contributors
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • Users
            • Groups