Skip to content

P6 Standalone - Excessive SQL lag?

Eric RiveraMember for 18 years 3 months
Created
9
7
0
Hello all!
I am having an issue with P6 when working in a LOCAL database. When I open PM and select the database on my laptop (not the company server) and attempt to open any of the projects stored there, it seems to take FOREVER... When I look at my computer system resources, it shows SQL using over 1/2 the CPU.
EVENTUALLY the project(s) will open, sometimes after 30 minutes or more. Others tell me that they don’t have any lag at all.
Has anyone else had a simmilar experience, and if so, how did you over come it?

Thanks,
Eric

9 replies

Oldest first
  1. 0
    Dieter Wambach ·
    Eric

    Did you a backup and restore?
    Did you run (in P6) Tools --> Check Project Integrity?
    Did you check the event log?

    I assume your pc has sufficient performance and your project below one million activities - or 4 GB.
    Sorry just questions, no answer. It seems something wrong with the database.

    Regards
    Dieter
  2. 0
    Arend Kok ·
    Eric.

    Have you tried rebuilding your indexes.
    I run this script on my database regulary. It keeps it really fast.

    Here it is :
    DECLARE @Database VARCHAR(255)
    DECLARE @Table VARCHAR(255)
    DECLARE @cmd NVARCHAR(500)
    DECLARE @fillfactor INT

    SET @fillfactor = 90

    DECLARE DatabaseCursor CURSOR FOR
    SELECT name FROM master.dbo.sysdatabases
    WHERE name NOT IN (’master’,’model’,’msdb’,’tempdb’,’distrbution’, ’mmdb$primavera’)
    ORDER BY 1

    OPEN DatabaseCursor

    FETCH NEXT FROM DatabaseCursor INTO @Database
    WHILE @@FETCH_STATUS = 0
    BEGIN

    SET @cmd = ’DECLARE TableCursor CURSOR FOR SELECT table_catalog + ’’.’’ + table_schema + ’’.’’ + table_name as tableName
    FROM ’ + @Database + ’.INFORMATION_SCHEMA.TABLES WHERE table_type = ’’BASE TABLE’’’

    -- create table cursor
    EXEC (@cmd)
    OPEN TableCursor

    FETCH NEXT FROM TableCursor INTO @Table
    WHILE @@FETCH_STATUS = 0
    BEGIN

    -- SQL 2000 command
    --DBCC DBREINDEX(@Table,’ ’,@fillfactor)

    -- SQL 2005 command
    SET @cmd = ’ALTER INDEX ALL ON ’ + @Table + ’ REBUILD WITH (FILLFACTOR = ’ + CONVERT(VARCHAR(3),@fillfactor) + ’)’
    EXEC (@cmd)

    FETCH NEXT FROM TableCursor INTO @Table
    END

    CLOSE TableCursor
    DEALLOCATE TableCursor

    FETCH NEXT FROM DatabaseCursor INTO @Database
    END
    CLOSE DatabaseCursor
    DEALLOCATE DatabaseCursor


    All this will do is rebuild all indexes for all tables in your database.

    Hope this helps.

    Regards,
    Arend Kok
  3. 0
    David Kelly ·
    Arend,

    You don’t have a similar script for the full V5 on Oracle?
  4. 0
    Arend Kok ·
    Hi David,

    You can run this script to produce the script that will rebuild all indexes :

    set head off pagesize 0 echo off verify off feedback off
    spool reb.out
    select ’alter session set sort_area_size = 36000000;’
    from dual
    /
    select ’alter index ’ || index_name || ’ rebuild;’
    from user_indexes
    /
    spool off
    set head on pagesize 35 verify on feedback on
    @@reb.out

    Thanks to Guri Singh
    Sr. Oracle DBA
  5. 0
    David Kelly ·
    Thanks
  6. 0
    Arend Kok ·
    No Problem!
  7. 0
    Isagani Culaway ·
    good day,

    Is anyone here knew how to install the P5 software cause my friend have one but we could not install the P5. May be anyone of you have an idea to install this and run it properly.

    send me to my email if you know.
    engr_gans@yahoo.com


    Thanks,
  8. 0
    Andrew Podolny ·
    Here is another script to reindex all tables with fill factor 90%:

    USE pmdb$primavera --your database name might be different

    DECLARE @TableName varchar(255)

    DECLARE TableCursor CURSOR FOR
    SELECT table_name FROM information_schema.tables
    WHERE table_type = ’base table’

    OPEN TableCursor

    FETCH NEXT FROM TableCursor INTO @TableName
    WHILE @@FETCH_STATUS = 0
    BEGIN
    DBCC DBREINDEX(@TableName,’ ’,90)
    FETCH NEXT FROM TableCursor INTO @TableName
    END

    CLOSE TableCursor

    DEALLOCATE TableCursor
  9. 0
    António Faria ·
    You could also try this (update statistics in SQL Server Express):

    http://www.planningplanet.com/forum/forum_post.asp?fid=1&Cat=8&Top=44886

    It worked with me.

    António

Log in or join to reply

ProjectControls.com is free to join. Members can post questions, reply, vote and follow discussions.

Existing members: your original username and password still work. Forgot password?