Uploaded image for project: 'Teiid'
  1. Teiid
  2. TEIID-5434

count(*) returns different nr of rows compared to normal select

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Critical Critical
    • 11.1, 10.3.4, 11.0.2, 8.12.15.6_4
    • 10.3.3
    • None
    • None

      Normal select return 162175 rows:

      select pa.ICUSessionID,11074, obr.DateTime, obr.varvalue, true, 15001866
      from tv_retrieve_observrec obr
      join kd_matric.ExtrPatICUAdmissions epa on epa.PatientID = obr.admissionid
      join kd_matric.PatICUAdmissions pa on pa.ICUSessionID = epa.ICUSessionID and pa.BatchID < 1152
      where obr.VariableID = 15001866;
      

      count query return a count of 11573

      select count(*)
      from tv_retrieve_observrec obr
      join kd_matric.ExtrPatICUAdmissions epa on epa.PatientID = obr.admissionid
      join kd_matric.PatICUAdmissions pa on pa.ICUSessionID = epa.ICUSessionID and pa.BatchID < 1152
      where obr.VariableID = 15001866;
      

      This was detected on a snapshot release of 10.3.3

        1. count_plan_debug_log.txt
          328 kB
          Bram Gadeyne
        2. count_plan_text.txt
          20 kB
          Bram Gadeyne
        3. count_plan.txt
          328 kB
          Bram Gadeyne
        4. select_plan_debug_log.txt
          309 kB
          Bram Gadeyne
        5. select_plan_text.txt
          19 kB
          Bram Gadeyne
        6. select_plan.txt
          309 kB
          Bram Gadeyne

              rhn-engineering-shawkins Steven Hawkins
              gadeynebram Bram Gadeyne (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: