Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-36470

Server RAM peaking on update statement within trigger

    XMLWordPrintable

Details

    • Task
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Incomplete
    • N/A
    • Server
    • None

    Description

      I've noticed server process RAM raising while executing simple update on table with no rows. From normal 170-350MB in RAM it peaks up to 2200 MB. I can decrease it back with "flush tables". The table has trigger on update. There is problematic update in it of such form:

      UPDATE spac y,v_spac_updated u SET
       y.ph_id               =u.ph_id
      ,y.src_id              =u.src_id
      ...
      where 
      y.dp_id=u.dp_id AND y.sp_id=u.sp_id AND
      decode(y.ph_id               ,u.ph_id                 ,0,1)
      +decode(y.src_id              ,u.src_id                ,0,1)
      >0
      

      where v_spac_updated is a view.
      While not from trigger this update presented executes fast and no RAM peak occurs, but from trigger it does.
      Seems like some inefficiency in resource managing. Could this be improved?

      Attachments

        Activity

          People

            Unassigned Unassigned
            balta Tadas Balaišis
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.