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, topoColumnFROM(SELECT 'Table' objectType, a.owner owner, a.Table_name name, b.column_name geomColumn, c.column_name topoColumnFROM all_Tables a, all_sdo_geom_metadata b, all_sdo_topo_metadata cWHERE (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 '/') unionSELECT 'Table' objectType, a.owner owner, a.Table_name name, b.column_name geomColumn, c.column_name topoColumnFROM all_Tables a, all_sdo_geom_metadata b, all_sdo_topo_metadata cWHERE (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 '/') unionSELECT 'View' objectType, a.owner owner, a.View_name name, b.column_name geomColumn, c.column_name topoColumnFROM all_Views a, all_sdo_geom_metadata b, all_sdo_topo_metadata cWHERE (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 '/') unionSELECT 'View' objectType, a.owner owner, a.View_name name, b.column_name geomColumn, c.column_name topoColumnFROM all_Views a, all_sdo_geom_metadata b, all_sdo_topo_metadata cWHERE (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".
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.
I will have a look at creating to roles and assigning them to the users. Can I get away with just creating the roles and assigning them to my existing users, or do I need to create additional users as well?
I know this can all be scripted, I just need to know exactly what I am scripting.
Just create the roles and apply them to the existing users. As you create new users, add the roles to those users.
i.e.
Oracle Docs
docs.oracle.com/.../statements_6012.htm
Examples
psoug.org/.../roles.html
www.techonthenet.com/.../roles.php
HTH
Jerry
Hi Jerry,
I tried this but the GSA presents nothing in the feature list to select from (this user doesn't own any tables).
When I went to Register the features within the GSA, I left the 'Features owned by Others' unticked.
And because this user doesn't own any tables, nothing was listed.
We have also noticed that it is performing differently for different PCs (which I don't understand why). When I run the process from my laptop it takes a minute or two and when I run the same process with the same Oracle user on another PC it will run for hours (we have killed the process after 4 hours). We have also tried different GSA versions to see if that made any difference.
Right, the user does not own the tables, so i would expect that no features show up. If you check the "Features owned by other users", I would suspect that features will show up.
As for it taking a lot longer on some PC's versus others, Are you sure that the pc's where it takes longer has the right version of the Oracle Client loaded and that there is only one version of the Oracle Client ? Even if the Oracle Server version is 10, or 11 you must use the 11 client.
If this does not help, Can I get a dump of the database ? If it is not too large and if it does not have sensitive data ?
Tx.