Layer7 API Management

 View Only
  • 1.  Truncate table oauth_token

    Posted Jun 17, 2020 11:08 AM
    Hello, how are you guys?

    IN our production environment, we have the oauth_token HUGE (250GB).

    I need to delete all expired tokens, but it`s very slow to perform the
    deletes (doc CA API Management Oauth Toolkit - 3.6 - page 272).

    But it`s very slow the deletes due table token size.

    ----------------------
    delete from oauth_token where rtoken is not null and rexpiration < unix_timestamp();

    delete from oauth_token where expiration < unix_timestamp() and rtoken is null;
    ----------------------

    It`s impossible delete expired tokens using those commands.

    Please, Do you guys have any suggestion?

    Can I simply truncate this table to reduce space size?
    And what is impact of truncate this table in a production environment like that?

    Thank you very much!


  • 2.  RE: Truncate table oauth_token
    Best Answer

    Broadcom Employee
    Posted Jun 18, 2020 07:25 AM
    Hi Kevin,

    It looks like @Zhijun He addressed your question in another thread: https://community.broadcom.com/enterprisesoftware/communities/community-home/digestviewer/viewthread?GroupId=1255&MID=819204&CommunityKey=0f580f5f-30a4-41de-a75c-e5f433325a18&tab=digestviewer&ReturnUrl=%2fenterprisesoftware%2fcommunities%2fcommunity-home%2fdigestviewer%3fCommunityKey%3d0f580f5f-30a4-41de-a75c-e5f433325a18​​