title: Can I disable QUERY OPTIMIZATION for MQT in DB2 LUW without recreating it?
body: <h3>UPDATE from 2021</h3>
  <p>This question is no longer actual for me.</p>
  <p>It was a short period when I worked with DB2 and I don't know how it's in recent versions.</p>
  <p>The problem was: I could not test effect of MQT without rebuilding it.</p>
  <p>Which was not practical when you deal with multi-Gb data.</p>
  <p>I did not found solution earlier, I don't know why question was minused.</p>
  <p>SO recommends to <strong>not</strong> delete questions with answers and who knows: maybe somebody finally answers that.</p>
  <hr>
  <p>I have a MQT in DB2 10.5 LUW:</p>
  <pre><code>CREATE TABLE MyMQT AS(
  SELECT * FROM MyTable
      WHERE
          ServerName = 'COL'
          AND LASTOCCURRENCE &gt; TIMESTAMP '2015-12-21 00:00:00' 
  )
  DATA INITIALLY DEFERRED REFRESH immediate
  ENABLE QUERY OPTIMIZATION
  MAINTAINED BY SYSTEM;
  </code></pre>
  <p>I want to <code>DISABLE QUERY OPTIMIZATION</code> without <code>DROP/CREATE</code>.</p>
  <p>I found &quot;Altering materialized query table properties&quot; <a href="https://www-01.ibm.com/support/knowledgecenter/SSEPEK_10.0.0/com.ibm.db2z10.doc.admin/src/tpc/db2z_changemqtableattribs.html" rel="nofollow noreferrer">https://www-01.ibm.com/support/knowledgecenter/SSEPEK_10.0.0/com.ibm.db2z10.doc.admin/src/tpc/db2z_changemqtableattribs.html</a>
  but this is for z/OS.</p>
  <p>If I try:</p>
  <pre><code>ALTER TABLE MyMQT DISABLE QUERY OPTIMIZATION;
  </code></pre>
  <p>I get:</p>
  <pre><code>DB21034E  The command was processed as an SQL statement because it was not a
  valid Command Line Processor command.  During SQL processing it returned:
  SQL0104N  An unexpected token &quot;TABLE&quot; was found following &quot;ALTER &quot;.  Expected
  tokens may include:  &quot;VIEW&quot;.  SQLSTATE=42601
  </code></pre>
  <p>Documentation for LUW explains how to change MQT to regular table and otherwise.</p>
  <p>Can I alter MQT options in DB2 LUW without recreating it?</p>
  <hr>
  <h3>Edit</h3>
  <p>It's quite strange, but looks like this is impossible to achieve in DB2 LUW.</p>
  <p>As data_henrik mentioned, it's possible to disable/enable optimization for all MQTs.</p>
  <p>I accept his answer although it's not quite what I was looking for.</p>