[Geoserver-users] SDO_TUNE.EXTENT_OF - Oracle

Hi List,
I’m using GeoServer with debuging on full. I noticed this when getting the bounding box of an Oracle connection:

04 Jan 14:24:38 DEBUG [org.geotools.jdbc] - CREATE CONNECTION
04 Jan 14:24:38 WARN [org.geotools.jdbc] - Failed to use SDO_TUNE.EXTENT_OF, falling back on envelope aggregation
java.sql.SQLException: ORA-00942: table or view does not exist
ORA-06512: at “MDSYS.SDO_TUNE”, line 817

at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:331)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:288)

So investigated out of curiosity. We do actually have the SDO_TUNE.EXTENT_OF function available, and it does work when I query the database directly using it (i.e.: SELECT SDO_TUNE.EXTENT_OF(‘BOUNDARY_WSHIRE_COUNTY’, ‘SDO_GEOMETRY’) FROM DUAL; works just fine).

So why would it fail for GeoServer? Given the error is a “table not found” is the correct table being sent? The logs don’t show the actual query being sent so I can’t see whats happening.

I even downloaded the GeoServer source to try and find out what’s happening (I don’t do Java, but it should be readable at least), but of course after searching it couldn’t actually find it because its in the Oracle plugin. I can’t seem to find the source for that.

Is this a bug?
Jonathan

This transmission is intended for the named addressee(s) only and may contain sensitive or protectively marked material up to RESTRICTED and should be handled accordingly. Unless you are the named addressee (or authorised to receive it for the addressee) you may not copy or use it, or disclose it to anyone else. If you have received this transmission in error please notify the sender immediately. All email traffic sent to or from us, including without limitation all GCSX traffic, may be subject to recording and/or monitoring in accordance with relevant legislation.

On Fri, Jan 4, 2013 at 3:46 PM, Jonathan Moules <jonathanmoules@anonymised.com.4942…> wrote:

So investigated out of curiosity. We do actually have the SDO_TUNE.EXTENT_OF function available, and it does work when I query the database directly using it (i.e.: SELECT SDO_TUNE.EXTENT_OF(‘BOUNDARY_WSHIRE_COUNTY’, ‘SDO_GEOMETRY’) FROM DUAL; works just fine).

So why would it fail for GeoServer? Given the error is a “table not found” is the correct table being sent? The logs don’t show the actual query being sent so I can’t see whats happening.

The query being built should be exactly the same you have run.
I’ve just added a debug statement that will log the query used for sdo_tune.extent_of,
that migth help.

I even downloaded the GeoServer source to try and find out what’s happening (I don’t do Java, but it should be readable at least), but of course after searching it couldn’t actually find it because its in the Oracle plugin. I can’t seem to find the source for that.

The sources for all data sources are back in GeoTools, the Oracle one in particular is
split in two, Oracle specific part:
https://github.com/geotools/geotools/tree/master/modules/plugin/jdbc/jdbc-oracle/src/main/java/org/geotools/data/oracle
and generic spatial database support:
https://github.com/geotools/geotools/tree/master/modules/library/jdbc/src/main/java/org/geotools/jdbc

Cheers
Andrea

==
Our support, Your Success! Visit http://opensdi.geo-solutions.it for more information.

Ing. Andrea Aime
@geowolf
Technical Lead

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39 339 8844549

http://www.geo-solutions.it
http://twitter.com/geosolutions_it


On Sun, Jan 6, 2013 at 10:54 AM, Andrea Aime <andrea.aime@anonymised.com> wrote:

On Fri, Jan 4, 2013 at 3:46 PM, Jonathan Moules <jonathanmoules@anonymised.com> wrote:

So investigated out of curiosity. We do actually have the SDO_TUNE.EXTENT_OF function available, and it does work when I query the database directly using it (i.e.: SELECT SDO_TUNE.EXTENT_OF(‘BOUNDARY_WSHIRE_COUNTY’, ‘SDO_GEOMETRY’) FROM DUAL; works just fine).

So why would it fail for GeoServer? Given the error is a “table not found” is the correct table being sent? The logs don’t show the actual query being sent so I can’t see whats happening.

The query being built should be exactly the same you have run.
I’ve just added a debug statement that will log the query used for sdo_tune.extent_of,
that migth help.

Ah forgot, the modified version of the Oracle plugin will appear among the nightly builds
starting tomorrow, Jan 7, here:
http://gridlock.opengeo.org/geoserver/2.2.x/

(look for the ext-* folders)

Cheers
Andrea

==
Our support, Your Success! Visit http://opensdi.geo-solutions.it for more information.

Ing. Andrea Aime
@geowolf
Technical Lead

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39 339 8844549

http://www.geo-solutions.it
http://twitter.com/geosolutions_it


Hi Andrea,
Thanks for this. I’ve identified the issue (lack of schema name in the query) and reported it to JIRA:
http://jira.codehaus.org/browse/GEOS-5535
Along with a suggestion for how to better determine if SDO_TUNE.EXTENT_OF is actually installed.

Cheers,
Jonathan

On 6 January 2013 09:55, Andrea Aime <andrea.aime@anonymised.com> wrote:

On Sun, Jan 6, 2013 at 10:54 AM, Andrea Aime <andrea.aime@anonymised.com> wrote:

On Fri, Jan 4, 2013 at 3:46 PM, Jonathan Moules <jonathanmoules@anonymised.com> wrote:

So investigated out of curiosity. We do actually have the SDO_TUNE.EXTENT_OF function available, and it does work when I query the database directly using it (i.e.: SELECT SDO_TUNE.EXTENT_OF(‘BOUNDARY_WSHIRE_COUNTY’, ‘SDO_GEOMETRY’) FROM DUAL; works just fine).

So why would it fail for GeoServer? Given the error is a “table not found” is the correct table being sent? The logs don’t show the actual query being sent so I can’t see whats happening.

The query being built should be exactly the same you have run.
I’ve just added a debug statement that will log the query used for sdo_tune.extent_of,
that migth help.

Ah forgot, the modified version of the Oracle plugin will appear among the nightly builds
starting tomorrow, Jan 7, here:
http://gridlock.opengeo.org/geoserver/2.2.x/

(look for the ext-* folders)

Cheers

Andrea

==
Our support, Your Success! Visit http://opensdi.geo-solutions.it for more information.

Ing. Andrea Aime
@geowolf
Technical Lead

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39 339 8844549

http://www.geo-solutions.it
http://twitter.com/geosolutions_it


This transmission is intended for the named addressee(s) only and may contain sensitive or protectively marked material up to RESTRICTED and should be handled accordingly. Unless you are the named addressee (or authorised to receive it for the addressee) you may not copy or use it, or disclose it to anyone else. If you have received this transmission in error please notify the sender immediately. All email traffic sent to or from us, including without limitation all GCSX traffic, may be subject to recording and/or monitoring in accordance with relevant legislation.

Jonathan,

I was never able to define large datasets in Oracle letting Geoserver find
the bounding box and thought it is a Geoserver problem but it is not.

As you said and Andrea confirmed in the background on the oracle level it
must be one of these commands:

SELECT SDO_TUNE.EXTENT_OF('TABLE_NAME', 'SPATIAL_COLUMN') FROM DUAL;
or
SELECT SDO_AGGR_MBR(SPATIAL_COLUMN) FROM TABLE_NAME;

Running the SDO_TUNE.EXTENT_OF on a dataset with 3.3 million features I gave
up after 15 mins.
Trying the command with smaller datasets I get the following numbers.
secs feature numbers
1.6 935
1.9 3700
7.6 28000
30.25 105000

Sort of linear increase and atrocious performance. The 'SDO_AGGR_MBR' is
even worse. So, I get the BBox from ArcSDE and hack it in by hand which
infuriates me, because I think a decent spatial database should work on its
own resources.
Geoserver is 2.1.3 and all the tables have spatial indices.
Anything I might do wrong with the DB or any solutions for that?

Cheers

Christian

-----
____________________________

Dr Christian Maul
Project Manager

Information Services Branch
Department of Sustainability and Environment
Level13, Marland House, 570 Bourke Street
Melbourne 3000

PO Box 500, East Melbourne Vic 3002

Telephone: +61-3-8636 2325
Telefax: +61-3-8636 2813
--
View this message in context: http://osgeo-org.1560.n6.nabble.com/SDO-TUNE-EXTENT-OF-Oracle-tp5025640p5026061.html
Sent from the GeoServer - User mailing list archive at Nabble.com.

On Tue, Jan 8, 2013 at 7:18 AM, cmaul <Christian.Maul@anonymised.com> wrote:

Sort of linear increase and atrocious performance. The ‘SDO_AGGR_MBR’ is
even worse. So, I get the BBox from ArcSDE and hack it in by hand which
infuriates me, because I think a decent spatial database should work on its
own resources.

Ha ha, matches my experience 1-1. Oracle spatial is indeed infuriating, espetially
when compared to how easy things are in PostGIS, both to use, and to program against.

Cheers
Andrea

==
Our support, Your Success! Visit http://opensdi.geo-solutions.it for more information.

Ing. Andrea Aime
@geowolf
Technical Lead

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39 339 8844549

http://www.geo-solutions.it
http://twitter.com/geosolutions_it


Il 08/01/2013 07:18, cmaul ha scritto:

Jonathan,

I was never able to define large datasets in Oracle letting Geoserver find
the bounding box and thought it is a Geoserver problem but it is not.

As you said and Andrea confirmed in the background on the oracle level it
must be one of these commands:

SELECT SDO_TUNE.EXTENT_OF('TABLE_NAME', 'SPATIAL_COLUMN') FROM DUAL;
or
SELECT SDO_AGGR_MBR(SPATIAL_COLUMN) FROM TABLE_NAME;

Running the SDO_TUNE.EXTENT_OF on a dataset with 3.3 million features I gave
up after 15 mins.
Trying the command with smaller datasets I get the following numbers.
secs feature numbers
1.6 935
1.9 3700
7.6 28000
30.25 105000

Sort of linear increase and atrocious performance. The 'SDO_AGGR_MBR' is
even worse. So, I get the BBox from ArcSDE and hack it in by hand which
infuriates me, because I think a decent spatial database should work on its
own resources.
Geoserver is 2.1.3 and all the tables have spatial indices.
Anything I might do wrong with the DB or any solutions for that?

Cheers

Christian

Hi,

I made a short comparative study about usage of Oracle Spatial for a rather large dataset we are planning to use, about 100k features with . I tested the both bounding box, aggregate and intersection function over the whole dataset. It turned out performances on the db side were unacceptable, even on a fairly good workstation (2 quad core xeon procs, 32G ram and SAS hds).
I had to skip Oracle in favour of PostGIS, the performances on my quad core development pc are order of magnitudes better.
I can confirm it's not a Geoserver issue, the same Geoserver that was sluggish on Oracle Spatial became blazing fast when hooked to Postgres.
I don't know if Oracle Spatial performances get better on big mainframes or racs, if you can afford them.

Regards,

Paolo

--
Paolo Crosato

Hi All,
We should rename this the “Oracle lack of appreciate thread”. I can concur that its something of a pain but unfortunately its our “Corporate solution” though I am pressing for PostGIS, but that’ll be a long fight.

Following Christian, I’ve done my own testing (hence my delayed reply - look at the numbers and you’ll see why :wink: ).

https://docs.google.com/open?id=0B22cYd3gwE-6MkRfdlp6VFNOZjQ

My own EXTENT_OF speeds were much faster than yours Christian - in fact I found the exact opposite linear progression (gets faster for larger datasets). Even for ~20million features it only took ~60 seconds. I honestly don’t know why mine is so much faster.
Of course, my AGGR_MBR times were utterly dismal in comparison. You’ll see that features per second is fairly consistently slow with AGGR_MBR.
There’s also the issue of load; when using AGR_MBR, it uses a fair amount of CPU resources on the box (there’s nothing else running on that box).


I tried to investigate what the difference was between EXTENT_OF and SDO_AGGR_MBR but that doesn’t seem to be documented anywhere I can find.
I did however discover this page: http://support.cs.nott.ac.uk/help/docs/databases/oracle/standard/appdev.101/b10826/sdo_objtune.htm#i857307 - which states that EXTENT_OF is deprecated (and this is in Oracle 10.1):

“This function is deprecated, and will not be supported in future versions of Spatial. You are instead encouraged to use the SDO_AGGR_MBR function, documented in Chapter 14, to return the MBR of geometries. The SDO_TUNE.EXTENT_OF function is limited to two-dimensional geometries, whereas the SDO_AGGR_MBR function is not.”

Which given my statistics seems like a downgrade.

Ourselves we don’t really use any of the spatial functions of Oracle beyond SDO_FILTER (which is the intersect) - all of that analysis is done client side, so speed hasn’t been an issue.


Given all of this, would it be worth including a “select count(*) from Table_name” when a user clicks “calculate bounds” on Oracle and warning the user if the feature count is > 100,000 that they should figure their bounds out another way? At least if its using AGGR_MBR. Otherwise courtesy of not-thread-safe, GeoServer admin will be locked up for literally hours if there are millions of features.

Jonathan

On 8 January 2013 10:19, Paolo Crosato <paolo.crosato@anonymised.com> wrote:

Il 08/01/2013 07:18, cmaul ha scritto:

Jonathan,

I was never able to define large datasets in Oracle letting Geoserver find
the bounding box and thought it is a Geoserver problem but it is not.

As you said and Andrea confirmed in the background on the oracle level it
must be one of these commands:

SELECT SDO_TUNE.EXTENT_OF(‘TABLE_NAME’, ‘SPATIAL_COLUMN’) FROM DUAL;
or
SELECT SDO_AGGR_MBR(SPATIAL_COLUMN) FROM TABLE_NAME;

Running the SDO_TUNE.EXTENT_OF on a dataset with 3.3 million features I gave
up after 15 mins.
Trying the command with smaller datasets I get the following numbers.
secs feature numbers
1.6 935
1.9 3700
7.6 28000
30.25 105000

Sort of linear increase and atrocious performance. The ‘SDO_AGGR_MBR’ is
even worse. So, I get the BBox from ArcSDE and hack it in by hand which
infuriates me, because I think a decent spatial database should work on its
own resources.
Geoserver is 2.1.3 and all the tables have spatial indices.
Anything I might do wrong with the DB or any solutions for that?

Cheers

Christian

Hi,

I made a short comparative study about usage of Oracle Spatial for a
rather large dataset we are planning to use, about 100k features with .
I tested the both bounding box, aggregate and intersection function over
the whole dataset. It turned out performances on the db side were
unacceptable, even on a fairly good workstation (2 quad core xeon procs,
32G ram and SAS hds).
I had to skip Oracle in favour of PostGIS, the performances on my quad
core development pc are order of magnitudes better.
I can confirm it’s not a Geoserver issue, the same Geoserver that was
sluggish on Oracle Spatial became blazing fast when hooked to Postgres.
I don’t know if Oracle Spatial performances get better on big mainframes
or racs, if you can afford them.

Regards,

Paolo


Paolo Crosato


Master SQL Server Development, Administration, T-SQL, SSAS, SSIS, SSRS
and more. Get SQL Server skills now (including 2012) with LearnDevNow -
200+ hours of step-by-step video tutorials by Microsoft MVPs and experts.
SALE $99.99 this month only - learn more at:
http://p.sf.net/sfu/learnmore_122512


Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

This transmission is intended for the named addressee(s) only and may contain sensitive or protectively marked material up to RESTRICTED and should be handled accordingly. Unless you are the named addressee (or authorised to receive it for the addressee) you may not copy or use it, or disclose it to anyone else. If you have received this transmission in error please notify the sender immediately. All email traffic sent to or from us, including without limitation all GCSX traffic, may be subject to recording and/or monitoring in accordance with relevant legislation.

On Wed, Jan 9, 2013 at 11:28 AM, Jonathan Moules <jonathanmoules@anonymised.com…4942…> wrote:

Given all of this, would it be worth including a “select count(*) from Table_name” when a user clicks “calculate bounds” on Oracle and warning the user if the feature count is > 100,000 that they should figure their bounds out another way? At least if its using AGGR_MBR. Otherwise courtesy of not-thread-safe, GeoServer admin will be locked up for literally hours if there are millions of features.

Eh, the code there has to be database independent (the code there does not really know what data source it is playing against),
and for PostGIS getting the “estimated bbox” is instant on tables of any size, whilst count(*) can take a lot of time on
large tables (tens of seconds), same goes for SDE, cascaded WFS, SQL Server, MySQL and so on.

So the answer is… not going to happen :slight_smile:

Cheers
Andrea

==
Our support, Your Success! Visit http://opensdi.geo-solutions.it for more information.

Ing. Andrea Aime
@geowolf
Technical Lead

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39 339 8844549

http://www.geo-solutions.it
http://twitter.com/geosolutions_it


On Wed, Jan 9, 2013 at 11:28 AM, Jonathan Moules
<jonathanmoules@anonymised.com> wrote:

I did however discover this page:
http://support.cs.nott.ac.uk/help/docs/databases/oracle/standard/appdev.101/b10826/sdo_objtune.htm#i857307
- which states that EXTENT_OF is deprecated (and this is in Oracle 10.1):

"This function is deprecated, and will not be supported in future versions

Which given my statistics seems like a downgrade.

Hi,

In Oracle 11g documentation it's not deprecated anymore, so it seems
they've changed their mind...

http://docs.oracle.com/cd/B28359_01/appdev.111/b28400/sdo_objtune.htm

--

Our support, Your Success! Visit http://opensdi.geo-solutions.it for
more information.

Davide Savazzi
@svzdvd
Senior Software Engineer

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272

http://www.geo-solutions.it
http://twitter.com/geosolutions_it

Hi

Andrea,I was thinking that could be in the Oracle driver itself given its an Oracle specific thing. But don’t know how it’d interface with GeoServer proper.
I’ll add a Jira suggestion that the documentation for Oracle reflect it with a nice big scary warning.
But something in the GeoServer itself seems necessary given it can literally lock up GeoServer for hours for a sufficiently large dataset.

Davide: Interesting. Nice to see Oracle are being as consistent as ever. But at least they’ve kept the useful function.

Jonathan

On 9 January 2013 10:43, Andrea Aime <andrea.aime@anonymised.com> wrote:

On Wed, Jan 9, 2013 at 11:28 AM, Jonathan Moules <jonathanmoules@anonymised.com> wrote:

Given all of this, would it be worth including a “select count(*) from Table_name” when a user clicks “calculate bounds” on Oracle and warning the user if the feature count is > 100,000 that they should figure their bounds out another way? At least if its using AGGR_MBR. Otherwise courtesy of not-thread-safe, GeoServer admin will be locked up for literally hours if there are millions of features.

Eh, the code there has to be database independent (the code there does not really know what data source it is playing against),
and for PostGIS getting the “estimated bbox” is instant on tables of any size, whilst count(*) can take a lot of time on
large tables (tens of seconds), same goes for SDE, cascaded WFS, SQL Server, MySQL and so on.

So the answer is… not going to happen :slight_smile:

Cheers

Andrea

==
Our support, Your Success! Visit http://opensdi.geo-solutions.it for more information.

Ing. Andrea Aime
@geowolf
Technical Lead

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39 339 8844549

http://www.geo-solutions.it
http://twitter.com/geosolutions_it


This transmission is intended for the named addressee(s) only and may contain sensitive or protectively marked material up to RESTRICTED and should be handled accordingly. Unless you are the named addressee (or authorised to receive it for the addressee) you may not copy or use it, or disclose it to anyone else. If you have received this transmission in error please notify the sender immediately. All email traffic sent to or from us, including without limitation all GCSX traffic, may be subject to recording and/or monitoring in accordance with relevant legislation.

Hello,

I think I found the problem Oracle 10.2.0.3.0 /Oracle 11.2.0.3.3

SELECT SDO_TUNE.EXTENT_OF('VMPROP.POINT', 'SHAPE') FROM DUAL;

DB features time
Oracle10 19Mio >30mins and no result
Oracle11 19Mio 0.375 seconds

and guess what? Suddenly Geoserver has no problems finding a bounding box.

Cheers

Christian

-----
____________________________

Dr Christian Maul
Project Manager

Information Services Branch
Department of Sustainability and Environment
Level13, Marland House, 570 Bourke Street
Melbourne 3000

PO Box 500, East Melbourne Vic 3002

Telephone: +61-3-8636 2325
Telefax: +61-3-8636 2813
--
View this message in context: http://osgeo-org.1560.n6.nabble.com/SDO-TUNE-EXTENT-OF-Oracle-tp5025640p5026521.html
Sent from the GeoServer - User mailing list archive at Nabble.com.

Hi Christian,
Wow, that’s fast for 19million features, but at that speed I’d assume it has the bounds pre-calculated; its probably getting them from MDSYS.USER_SDO_GEOM_METADATA or similar, but I don’t know how Oracle 11 does things.It seems like Oracle 11 is better at data integrity and maintaining its spatial metadata than 10.

Jonathan

On 10 January 2013 01:31, cmaul <Christian.Maul@anonymised.com> wrote:

Hello,

I think I found the problem Oracle 10.2.0.3.0 /Oracle 11.2.0.3.3

SELECT SDO_TUNE.EXTENT_OF(‘VMPROP.POINT’, ‘SHAPE’) FROM DUAL;

DB features time
Oracle10 19Mio >30mins and no result
Oracle11 19Mio 0.375 seconds

and guess what? Suddenly Geoserver has no problems finding a bounding box.

Cheers

Christian



Dr Christian Maul
Project Manager

Information Services Branch
Department of Sustainability and Environment
Level13, Marland House, 570 Bourke Street
Melbourne 3000

PO Box 500, East Melbourne Vic 3002

Telephone: +61-3-8636 2325
Telefax: +61-3-8636 2813

View this message in context: http://osgeo-org.1560.n6.nabble.com/SDO-TUNE-EXTENT-OF-Oracle-tp5025640p5026521.html

Sent from the GeoServer - User mailing list archive at Nabble.com.


Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
MVPs and experts. ON SALE this month only – learn more at:
http://p.sf.net/sfu/learnmore_122712


Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

This transmission is intended for the named addressee(s) only and may contain sensitive or protectively marked material up to RESTRICTED and should be handled accordingly. Unless you are the named addressee (or authorised to receive it for the addressee) you may not copy or use it, or disclose it to anyone else. If you have received this transmission in error please notify the sender immediately. All email traffic sent to or from us, including without limitation all GCSX traffic, may be subject to recording and/or monitoring in accordance with relevant legislation.

On Thu, Jan 10, 2013 at 10:31 AM, Jonathan Moules
<jonathanmoules@anonymised.com> wrote:

Hi Christian,
Wow, that's fast for 19million features, but at that speed I'd assume it has
the bounds pre-calculated; its probably getting them from
MDSYS.USER_SDO_GEOM_METADATA or similar, but I don't know how Oracle 11 does
things.
It seems like Oracle 11 is better at data integrity and maintaining its
spatial metadata than 10.

Hi Jonathan,

SDO_TUNE.EXTENT_OF should use the spatial index of your table.
The spatial index root contains the bounding box of all geometries in
the column, that's why it fast, no need to calculate anything.

--

Our support, Your Success! Visit http://opensdi.geo-solutions.it for
more information.

Davide Savazzi
@svzdvd
Senior Software Engineer

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272

http://www.geo-solutions.it
http://twitter.com/geosolutions_it

Hi Davide,
Interesting, I figured SDO_TUNE was using the spatial index, but not metadata bounds held by it. My own tests per the earlier spreadsheet (https://docs.google.com/open?id=0B22cYd3gwE-6MkRfdlp6VFNOZjQ) still have it be quite slow for 19.9million features - it took about a minute.

Useful to know though, Cheers,
Jonathan

On 10 January 2013 10:58, Davide <davide.savazzi@anonymised.com> wrote:

On Thu, Jan 10, 2013 at 10:31 AM, Jonathan Moules
<jonathanmoules@anonymised.com> wrote:

Hi Christian,
Wow, that’s fast for 19million features, but at that speed I’d assume it has
the bounds pre-calculated; its probably getting them from
MDSYS.USER_SDO_GEOM_METADATA or similar, but I don’t know how Oracle 11 does
things.
It seems like Oracle 11 is better at data integrity and maintaining its
spatial metadata than 10.

Hi Jonathan,

SDO_TUNE.EXTENT_OF should use the spatial index of your table.
The spatial index root contains the bounding box of all geometries in
the column, that’s why it fast, no need to calculate anything.

Our support, Your Success! Visit http://opensdi.geo-solutions.it for
more information.

Davide Savazzi
@svzdvd
Senior Software Engineer

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272

http://www.geo-solutions.it
http://twitter.com/geosolutions_it


Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
MVPs and experts. ON SALE this month only – learn more at:
http://p.sf.net/sfu/learnmore_122712


Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

This transmission is intended for the named addressee(s) only and may contain sensitive or protectively marked material up to RESTRICTED and should be handled accordingly. Unless you are the named addressee (or authorised to receive it for the addressee) you may not copy or use it, or disclose it to anyone else. If you have received this transmission in error please notify the sender immediately. All email traffic sent to or from us, including without limitation all GCSX traffic, may be subject to recording and/or monitoring in accordance with relevant legislation.