optimize problem

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Chris Welsh

    #1

    optimize problem

    I have a large'ish mySQL table, very text heavy (although no fields
    are larger than varchar 255). I do a bulk update once a day, which
    probably removes a 1/4 of the records, replacing them with fresh
    records. I find my table swiftly becomes massively inefficent, with
    the reported overhead soon exceeding the actual size of the table.

    So my questions are:
    (a) why does this happen?
    and
    (b) is there some programmatic way to perform the OPTIMIZE from my
    java updating process?

    thank you

    Chris
  • BDR

    #2
    Re: optimize problem

    Your answer can be found here...
    http://www.mysql.com/doc/en/OPTIMIZE_TABLE.html

    (ie, after a bulk update, issue an Optimize Table command... quite
    simple actually)

    Chris Welsh wrote:[color=blue]
    > I have a large'ish mySQL table, very text heavy (although no fields
    > are larger than varchar 255). I do a bulk update once a day, which
    > probably removes a 1/4 of the records, replacing them with fresh
    > records. I find my table swiftly becomes massively inefficent, with
    > the reported overhead soon exceeding the actual size of the table.
    >
    > So my questions are:
    > (a) why does this happen?
    > and
    > (b) is there some programmatic way to perform the OPTIMIZE from my
    > java updating process?
    >
    > thank you
    >
    > Chris[/color]

    Comment

    • BDR

      #3
      Re: optimize problem

      Your answer can be found here...
      http://www.mysql.com/doc/en/OPTIMIZE_TABLE.html

      (ie, after a bulk update, issue an Optimize Table command... quite
      simple actually)

      Chris Welsh wrote:[color=blue]
      > I have a large'ish mySQL table, very text heavy (although no fields
      > are larger than varchar 255). I do a bulk update once a day, which
      > probably removes a 1/4 of the records, replacing them with fresh
      > records. I find my table swiftly becomes massively inefficent, with
      > the reported overhead soon exceeding the actual size of the table.
      >
      > So my questions are:
      > (a) why does this happen?
      > and
      > (b) is there some programmatic way to perform the OPTIMIZE from my
      > java updating process?
      >
      > thank you
      >
      > Chris[/color]

      Comment

      Working...