GSA Performance with Oracle

Hi All,

We are experiencing large dealy when we are creating GSA projects for our Oracle based data.  I have found that the GSA executes the following query, which takes a long time (10+ minutes) on our Oracle server.  I am keen to know if other people have a similar issue, and what I can do to improve the performance of this query.

The query is:

SELECT objectType, owner, name, geomColumn, topoColumn
FROM
(SELECT 'Table' objectType, a.owner owner, a.Table_name name, b.column_name geomColumn, c.column_name topoColumn
FROM all_Tables a, all_sdo_geom_metadata b, all_sdo_topo_metadata c
WHERE (a.owner = b.owner(+) and a.Table_name = b.table_name(+)) AND (a.owner = c.owner(+) and a.Table_name = c.table_name(+)) AND a.owner NOT IN ('CTXSYS','DMSYS','EXFSYS','MDSYS','OLAPSYS','ORDSYS','SYS','SYSTEM','WKSYS','WMSYS','XDB') AND a.Table_name NOT LIKE '%$%' AND (b.table_name is not NULL)and (b.table_name is null or b.column_name not like '%.SPATIALEXTENT') AND (a.table_name not like '%/_AUX' ESCAPE '/') AND (a.table_name not like '%/_LT' ESCAPE '/') AND (a.table_name not like '%/_VT' ESCAPE '/') union
SELECT 'Table' objectType, a.owner owner, a.Table_name name, b.column_name geomColumn, c.column_name topoColumn
FROM all_Tables a, all_sdo_geom_metadata b, all_sdo_topo_metadata c
WHERE (a.owner = b.owner(+) and a.Table_name = b.table_name(+)) AND (a.owner = c.owner(+) and a.Table_name||'_LT' = c.table_name(+)) AND a.owner NOT IN ('CTXSYS','DMSYS','EXFSYS','MDSYS','OLAPSYS','ORDSYS','SYS','SYSTEM','WKSYS','WMSYS','XDB') AND a.Table_name NOT LIKE '%$%' AND (b.table_name is not NULL)and (b.table_name is null or b.column_name not like '%.SPATIALEXTENT') AND (a.table_name not like '%/_AUX' ESCAPE '/') AND (a.table_name not like '%/_LT' ESCAPE '/') AND (a.table_name not like '%/_VT' ESCAPE '/') union
SELECT 'View' objectType, a.owner owner, a.View_name name, b.column_name geomColumn, c.column_name topoColumn
FROM all_Views a, all_sdo_geom_metadata b, all_sdo_topo_metadata c
WHERE (a.owner = b.owner(+) and a.View_name = b.table_name(+)) AND (a.owner = c.owner(+) and a.View_name = c.table_name(+)) AND a.owner NOT IN ('CTXSYS','DMSYS','EXFSYS','MDSYS','OLAPSYS','ORDSYS','SYS','SYSTEM','WKSYS','WMSYS','XDB') AND a.View_name NOT LIKE '%$%' AND (b.table_name is not NULL)and (b.table_name is null or b.column_name not like '%.SPATIALEXTENT') AND (a.view_name not like '%/_BPKC' ESCAPE '/') AND (a.view_name not like '%/_CONF' ESCAPE '/') AND (a.view_name not like '%/_CONS' ESCAPE '/') AND (a.view_name not like '%/_DIFF' ESCAPE '/') AND (a.view_name not like '%/_LOCK' ESCAPE '/') AND (a.view_name not like '%/_MW' ESCAPE '/') AND (a.view_name not like '%/_PKC' ESCAPE '/') AND (a.view_name not like '%/_PKD' ESCAPE '/') AND (a.view_name not like '%/_PKDB' ESCAPE '/') AND (a.view_name not like '%/_PKDC' ESCAPE '/') AND (a.view_name not like '%/_LTB' ESCAPE '/') AND (a.view_name not like '%/_VTB' ESCAPE '/') AND (a.view_name not like '%/_HIST' ESCAPE '/') AND (a.view_name not like '%/_BASE' ESCAPE '/') union
SELECT 'View' objectType, a.owner owner, a.View_name name, b.column_name geomColumn, c.column_name topoColumn
FROM all_Views a, all_sdo_geom_metadata b, all_sdo_topo_metadata c
WHERE (a.owner = b.owner(+) and a.View_name = b.table_name(+)) AND (a.owner = c.owner(+) and a.View_name||'_LT' = c.table_name(+)) AND a.owner NOT IN ('CTXSYS','DMSYS','EXFSYS','MDSYS','OLAPSYS','ORDSYS','SYS','SYSTEM','WKSYS','WMSYS','XDB') AND a.View_name NOT LIKE '%$%' AND (b.table_name is not NULL)and (b.table_name is null or b.column_name not like '%.SPATIALEXTENT') AND (a.view_name not like '%/_BPKC' ESCAPE '/') AND (a.view_name not like '%/_CONF' ESCAPE '/') AND (a.view_name not like '%/_CONS' ESCAPE '/') AND (a.view_name not like '%/_DIFF' ESCAPE '/') AND (a.view_name not like '%/_LOCK' ESCAPE '/') AND (a.view_name not like '%/_MW' ESCAPE '/') AND (a.view_name not like '%/_PKC' ESCAPE '/') AND (a.view_name not like '%/_PKD' ESCAPE '/') AND (a.view_name not like '%/_PKDB' ESCAPE '/') AND (a.view_name not like '%/_PKDC' ESCAPE '/') AND (a.view_name not like '%/_LTB' ESCAPE '/') AND (a.view_name not like '%/_VTB' ESCAPE '/') AND (a.view_name not like '%/_HIST' ESCAPE '/') AND (a.view_name not like '%/_BASE' ESCAPE '/')) order by owner, name asc

Any help is much appreciated.

Regards, Ian

  • Greetings Ian,

    What version of Bentley Map are you running? Does the user/admin performing feature discovery have DBA privileges in the database? What feature discovery options are selected?

    Regards,

    Jeff Bielefeld [Bentley]



  • Hi Jeff,

    We are using Bentley Map Enterprise 08.11.09.91 and GSA 08.11.09.91.

    The users does not have admin (or dba) rights, and all the tables are owned by a different schema.

    The options selected were "Simple Geometry Feautres", "Features Owned by Other Users" and "Related Features".

     

  • When you select "Features owned by other users" the registration process looks for all feature sets in the entire database instance. Thus it takes a bit to discover everything.

    When you select related features, then it also looks for any child or sub-features of the primary features. Also increasing the scan time and complexity of the registration process.

    If you give the user rights to just certain feature tables, objects, etc., then turn off the Features Owned by Others, the process takes a lot less time.

     

  • Thanks Jerry,

    Is there anyway we can speed up the query?

    We use a generic login for our users performing edits (a seperate login for each department), and this allows us to see how makes any changes (and what PC they used to make the change) which is recorded in an audit table with every post.  This has enable us to to create subject related database schemas (i.e. schemas for assets, property, hazards, audit, etc).

    I understand that using a generic login requires the GSA to scan for all tables which the user has access to and then all the table relationships and sub-feature tables which are also required.  But I wonder if there is a better way of doing this than the current query.  The current query does return all the necessary information, but it is killing our Oracle server while it is running, and taking more than 10 minutes (with the CPUs at 100%) can create real issues.

    Cheers, Ian

  • Yes, create roles for the various objects and then assign the roles to the user, so they have access to only those objects you assigned. Then turn off the 'Features owned by other users'. This will greatly speed up the feature discovery process.

    This sounds like a lot of work, but adding a new user is then relatively simple.