How to View the Number of Items Not Indexed

  • 7020669
  • 15-Jul-2010
  • 07-Aug-2017


Retain (all versions)
MySQL (although same concepts apply to MS SQL and Oracle)
Linux (although same concepts apply to MySQL on Windows)


When performing searches, the desired results are not being returned.  What is the best way to view the number of items not yet Indexed by Retain?


In order to see how many items have not been indexed, the MySQL database needs to be be queried.  Follow these steps to see the number of items indexed:

1. Log in to the Retain Server.

2. Log in to MySQL as the root user.

3. Change to the Retain Database.

In order to query the correct retain database, it must be selected.  To see all the MySQL databases, run the command

show databases;

Locate the correct database and use the command use retain; where retain is the name of the retain database.

4. Query the Database.

To see the number of items that have not yet been indexed, run the command:

Retain 1.x/2.x:  select count(*) from Email where indexed = 0;
Retain 3.x/4.x:  select count(*) from t_message where f_indexed =0;

To see the count by each indexed state, see "SQL query for showing the message count of various index states".

Additional Information

This article was originally published in the GWAVA knowledgebase as article ID 1804.