Uploaded image for project: 'Phoenix'
  1. Phoenix
  2. PHOENIX-3866

COUNT(col) should scan along required column families only

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Patch Available
    • Minor
    • Resolution: Unresolved
    • None
    • None
    • None
    • None

    Description

      These two should be equivalent:

      0: jdbc:phoenix:localhost> select count(B.COLB) from test;
      +----------------+
      | COUNT(B.COLB)  |
      +----------------+
      | 10054          |
      +----------------+
      1 row selected (9.446 seconds)
      0: jdbc:phoenix:localhost> select count(B.COLB) from test where B.COLB is not null;
      +----------------+
      | COUNT(B.COLB)  |
      +----------------+
      | 10054          |
      +----------------+
      1 row selected (0.028 seconds)
      

      Clearly the plain COUNT is doing unnecessary work.

      Attachments

        1. PHOENIX-3866.patch
          5 kB
          James R. Taylor
        2. PHOENIX-3866_v3.patch
          7 kB
          James R. Taylor
        3. PHOENIX-3866_v2.patch
          7 kB
          James R. Taylor

        Activity

          People

            jamestaylor James R. Taylor
            larsh Lars Hofhansl
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated: