How do I see how many retired items I have?

book

Article ID: 238206

calendar_today

Updated On:

Products

CA Performance Management - Usage and Administration DX NetOps

Issue/Introduction

How can I find out how many retired items the database has?

Environment

All supported releases

Resolution

1. Access adminTools and choose: 2 Connect to Database


2. Find your schema (you will use this in place of $schema in any of the below calls that mention it):

\dn

Example:

dradmin=> \dn
        List of schemas
    Name    |  Owner  | Comment
------------+---------+---------
 v_internal | dradmin |
 v_catalog  | dradmin |
 v_monitor  | dradmin |
 public     | dradmin |
 v_func     | dradmin |
 v_txtindex | dradmin |
 dauser     | dauser  |    <--- Schema
(7 rows)

3. Check overall count (if Retired is not in this list, you likely do not have many at all):

select facet_qname, count(*) from $schema.v_item_facet where item_id in (select item_id from $schema.v_poll_item) group by 1 order by 2 desc limit 10;


Example:

dradmin=> select facet_qname, count(*) from dauser.v_item_facet where item_id in (select item_id from dauser.v_poll_item) group by 1 order by 2 desc limit 10;
                       facet_qname                       |  count
---------------------------------------------------------+---------
 {http://im.ca.com/inventory}Pollable                    | 2974469
 {http://im.ca.com/core}Syncable                         | 2964935
 {http://im.ca.com/inventory}DeviceComponent             | 2954551
 {http://im.ca.com/inventory}DiscoveryInfo               | 2378852
 {http://im.ca.com/inventory}Port                        | 1498259
 {http://im.ca.com/inventory}AlternatePort               |  683094
 {http://im.ca.com/core}Retired                          |  364510  <---- Retired Items
 {http://im.ca.com/inventory}PoolConnectionPoolMember    |  149838
 {http://im.ca.com/inventory}PoolConnectionPoolMemberPVA |  149832
 {http://im.ca.com/inventory}NodeAddress                 |   97421

Additional Information

How to find the correct polled item count for use in the Sizing Wizard:

https://knowledge.broadcom.com/external/article?articleId=238203

How do I see how many filtered items I have:

https://knowledge.broadcom.com/external/article?articleId=238205