Opened 15 years ago
Closed 15 years ago
#2933 closed enhancement (duplicate)
OracleSpatial driver update for single-pass sandbox
Reported by: | jimk | Owned by: | sdlime |
---|---|---|---|
Priority: | normal | Milestone: | 6.0 release |
Component: | Input - Native Oracle Spatial Support | Version: | unspecified |
Severity: | normal | Keywords: | |
Cc: |
Description
This is an updated oracle spatial driver to take advantage of the improvements in the single-pass sandbox.
Attachments (2)
Change History (7)
by , 15 years ago
Attachment: | maporaclespatial-single-pass.patch added |
---|
comment:1 by , 15 years ago
comment:2 by , 15 years ago
I forgot to escape the partial function names above so track thinks they are pages, which they aren't.
by , 15 years ago
Attachment: | maporaclespatial-single-pass-v2.patch added |
---|
A cleaned up version of the orig patch. Fixed the function=none bug and made speed improvements.
comment:3 by , 15 years ago
msOracleSpatialLayerGetShapes works a little differently now. In testing I found using FETCH_NEXT vs. FETCH_ABSOLUTE didn't make a performance difference so the code is simplified there. I fixed an error where I was using OCI_ATTR_ROW_COUNT when I should have been using OCI_ATTR_ROWS_FETCHED. This lead to separating the concepts of total rows fetched from the number of rows in the current buffer in the existing code. I then made a further optimization over the first patch by looking for the record id anywhere in the existing result buffer and not just using the result buffer for the next item.
comment:4 by , 15 years ago
Milestone: | → 6.0 release |
---|---|
Owner: | changed from | to
Status: | new → assigned |
Applied this (finally) to the single-pass sandbox in r9058.
Steve
comment:5 by , 15 years ago
Resolution: | → duplicate |
---|---|
Status: | assigned → closed |
Continued in #3069 as part of integration of RFC-52 into trunk.
This patch basically replaces msOracleSpatialGetShape() and modifies msOracleSpatialWhichShapes() and msOracleSpatialNextShape().
The idea is to change WhichShapes to create a scrollable cursor so random access/rewind is available on the statement. NextShape is changed to set the shape index to the index within the cursor instead of the primary key in the database. Other functions such as GetExtents and GetItems are modified to use a local statement handle instead of overwriting the global one shared between WhichShapes/NextShape/GetShape.
GetShape is now a modified version of NextShape which returns the shape at the cursor row specified cursor row. This means that before GetShape is called, WhichShapes need to be called and create a valid cursor.
There are probably further improvements that can be made be merging the GetShape and NextShape code some more. Currently the major differences are NextShape skips NULL geometries while GetShape will return an error if asked for a row with a NULL geometry and GetShape can do random access within the cursor and NextShape cannot. Note: GetShape is optimized to recognize the usual case where the record numbers are sequential and make the OCI call with FETCH_NEXT instead of FETCH_ABSOLUTE.