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

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

    XMLWordPrintable

Details

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

    Description

      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

      Attachments

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

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: