Details

    • Sprint:
      2017-10

      Description

      From mailing list:

      CREATE TABLE `test_like` (
        `dep` varchar(2) DEFAULT NULL
      ) ENGINE=Columnstore DEFAULT CHARSET=utf8
       
      CREATE TABLE `test_like_my` (
        `dep` varchar(2) DEFAULT NULL
      ) ENGINE=MyISAM DEFAULT CHARSET=utf8
       
      INSERT INTO test_like VALUES ('05'),('5'),('50'),('10');
      INSERT INTO test_like_my VALUES ('05'),('5'),('50'),('10');
       
      SELECT * FROM test_like;                                     
      +------+
      | dep  |
      +------+
      | 05   |
      | 5    |
      | 50   |
      | 10   |
      +------+
       
       
      SELECT * FROM test_like_my;
      +------+
      | dep  |
      +------+
      | 05   |
      | 5    |
      | 50   |
      | 10   |
      +------+
      

      And 2 query on columnstore:

      SELECT count(*) FROM test_like  WHERE ( dep LIKE "05%" )  ;  
      +----------+
      | count(*) |
      +----------+
      |        1 |
      +----------+
      SELECT count(*) FROM test_like  WHERE ( dep LIKE "%05%" )  ;
      +----------+
      | count(*) |
      +----------+
      |        2 |
      +----------+
      

      And 2 query on MyIsam :

      SELECT count(*) FROM test_like_my  WHERE ( dep LIKE "05%" )  ;
      +----------+
      | count(*) |
      +----------+
      |        1 |
      +----------+
      SELECT count(*) FROM test_like_my  WHERE ( dep LIKE "%05%" )  ;
      +----------+
      | count(*) |
      +----------+
      |        1 |
      +----------+
      

        Attachments

          Activity

            People

            • Assignee:
              dleeyh Daniel Lee
              Reporter:
              LinuxJedi Andrew Hutchings
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: