Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I know I can use ctx_query.count_hits to count the number of document matching a query, and similarly, I can use

count(*) where CONTAINS(...)

But these are only options if I actually have a query. Those functions throw an exception if I pass an empty string as a query (thanks oracle...). So,

Is there a way to count the total number of document indexed by my oracle.text index?

share|improve this question
Never used text indexes, but it sounds like you just want a simple count(*) of the table where the indexed field IS NOT NULL. – Phil Mar 26 '13 at 1:10
The index is built using a user store that filters and joins several tables, not just 1 table. That mean that I would need to reproduce the index building logic in a count query, which does not make sense. – Stephane Mar 26 '13 at 9:27

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.