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

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

    XMLWordPrintable

Details

    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_debug_log.txt
          328 kB
        2. count_plan_text.txt
          20 kB
        3. count_plan.txt
          328 kB
        4. select_plan_debug_log.txt
          309 kB
        5. select_plan_text.txt
          19 kB
        6. select_plan.txt
          309 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: