title: Partitions by null values with MySQL
body: <p>I have a table:</p>
  
  <pre><code>CREATE TABLE `NewTable` (
      `IBLOCK_ELEMENT_ID`  int(11) NOT NULL ,
      `PROPERTY_1836`  int(11) NULL DEFAULT NULL ,
      `DESCRIPTION_1836`  varchar(255) CHARACTER SET cp1251 COLLATE cp1251_general_ci NULL DEFAULT NULL ,
      `PROPERTY_1837`  int(11) NULL DEFAULT 0 ,
      `DESCRIPTION_1837`  varchar(255) CHARACTER SET cp1251 COLLATE cp1251_general_ci NULL DEFAULT NULL ,
      `PROPERTY_1838`  decimal(18,4) NULL DEFAULT NULL ,
      `DESCRIPTION_1838`  varchar(255) CHARACTER SET cp1251 COLLATE cp1251_general_ci NULL DEFAULT NULL ,
      `PROPERTY_3139`  int(11) NULL DEFAULT 0 ,
      `DESCRIPTION_3139`  varchar(255) CHARACTER SET cp1251 COLLATE cp1251_general_ci NULL DEFAULT NULL ,
      `PROPERTY_3173`  decimal(18,4) NULL DEFAULT NULL ,
      `DESCRIPTION_3173`  varchar(255) CHARACTER SET cp1251 COLLATE cp1251_general_ci NULL DEFAULT NULL ,
      PRIMARY KEY (`IBLOCK_ELEMENT_ID`),
      INDEX `ix_perf_b_iblock_element_pr_1` (`PROPERTY_1837`) USING BTREE ,
      INDEX `ix_perf_b_iblock_element_pr_2` (`PROPERTY_1836`) USING BTREE ,
      INDEX `ix_perf_b_iblock_element_pr_3` (`PROPERTY_3139`) USING BTREE 
  )
  ENGINE=InnoDB
  DEFAULT CHARACTER SET=cp1251 COLLATE=cp1251_general_ci
  ROW_FORMAT=COMPACT;
  </code></pre>
  
  <p>And a query with a condition:</p>
  
  <pre><code>WHERE PROPERTY_3139 IS NULL
  </code></pre>
  
  <p>I can't change a table or a query. But I know, if I'll split a table into 2 partitions - queries selecting only nullable values will work much faster.</p>
  
  <p>What kind of trick can I use to do this? NULL and NOT NULL is not a range and I can't use it as a list of values.</p>