Was this page helpful?

mod.project

    FPA Cache

    FPA Cache is internal structure that optimizes access to information about folders, projects and activities. It may happen due to insonsistency of DB that the cache is not up to date. Following commands may help you find out why.

    Check that the cache is generated

    SELECT
      SUM(FOLDER) AS FOLDER, SUM(PROJECT) AS PROJECT, SUM(ACTIVITY) AS ACTIVITY, SUM(FOLDER) + SUM(PROJECT) + SUM(ACTIVITY) AS TOTAL,
      SUM(CACHE_FOLDER) AS CACHE_FOLDER, SUM(CACHE_PROJECT) AS CACHE_PROJECT, SUM(CACHE_ACTIVITY) AS CACHE_ACTIVITY, SUM(CACHE_FOLDER) + SUM(CACHE_PROJECT) + SUM(CACHE_ACTIVITY) AS CACHE_TOTAL
    FROM (
      SELECT count(*) AS FOLDER, 0 AS PROJECT, 0 AS ACTIVITY, 0 AS CACHE_FOLDER, 0 AS CACHE_PROJECT, 0 AS CACHE_ACTIVITY FROM subject
      UNION ALL
      SELECT 0 AS FOLDER, count(*) AS PROJECT, 0 AS ACTIVITY, 0 AS CACHE_FOLDER, 0 AS CACHE_PROJECT, 0 AS CACHE_ACTIVITY FROM project
      UNION ALL
      SELECT 0 AS FOLDER, 0 AS PROJECT, count(*) AS ACTIVITY, 0 AS CACHE_FOLDER, 0 AS CACHE_PROJECT, 0 AS CACHE_ACTIVITY FROM activity
      UNION ALL
      SELECT 0 AS FOLDER, 0 AS PROJECT, 0 AS ACTIVITY, count(*) AS CACHE_FOLDER, 0 AS CACHE_PROJECT, 0 AS CACHE_ACTIVITY FROM cache_context WHERE context_type = 'FOLDER'
      UNION ALL
      SELECT 0 AS FOLDER, 0 AS PROJECT, 0 AS ACTIVITY, 0 AS CACHE_FOLDER, count(*) AS CACHE_PROJECT, 0 AS CACHE_ACTIVITY FROM cache_context WHERE context_type = 'PROJECT'
      UNION ALL
      SELECT 0 AS FOLDER, 0 AS PROJECT, 0 AS ACTIVITY, 0 AS CACHE_FOLDER, 0 AS CACHE_PROJECT, count(*) AS CACHE_ACTIVITY FROM cache_context WHERE context_type = 'ACTIVITY'
    ) AS myselect;

    Regenerate the cache

    UPDATE subject SET id = id WHERE 1 = 1;
    UPDATE project SET id = id WHERE 1 = 1;
    UPDATE activity SET id = id WHERE 1 = 1;
     
     
    Was this page helpful?
    Tag page (Edit tags)
    • No tags
    Page statistics
    20 view(s), 2 edit(s), and 1985 character(s)

    Comments

    You must login to post a comment.

    Attach file

    Attachments