Re: select count problem
Posted in 1997
Topics: Storage & Space Management, Server Administration
There is only one index on the table and SEX_TYPE_CD is not the index.
Thanks
On Thu, 22 May 1997, Daniel James wrote:
} David Fong wrote:
} >
} > Hi there, I have a large table 12 million rows fragmented
} > into 10 dbspaces. I use an sql statement eg
} > SELECT COUNT(*) FROM REGIST_PERSON WHERE SEX_TYPE_CD = 'M'
} > and result returns 0 rows (which is not true)
} > But when I use sql statement eg
} > SELECT COUNT(*) FROM REGIST_PERSON WHERE SEX_TYPE_CD LIKE 'M%'
} > the result returns approx 6 million (which is correct)
} > I have already check that the field SEX_TYPE_CD is a char(1) field.
} > I am using informix 7.21 ODS on a ncr 5100 platform running SVR4 unix
} > under dbaccess. Have anyone ever encounter such a problem? If so can
} > you please clue me in what is happenning.
} > I am currently waiting for answer from our support also.
}
} Is SEX_TYPE_CD indexed? If so, then it sounds like the index is
} corrupted.
}
} --
} -----------------------------------------------------------------------
} Daniel James - Database Administrator djames@statsci.com
} DAPD Div of MathSoft (formerly StatSci) (206) 283-8802 x284
}