[Mapserver-users] Performance of Virtual Spatial Data Access Method
Frank Warmerdam
warmerdam at pobox.com
Sat Mar 6 22:23:57 PST 2004
we wei wrote:
> Hi all,
>
> I have a question regarding about the performance of getting connection
> from Oracle database through OGR. From my mapfile, I got 8 layers which
> are all getting datasource from Oracle database through Virtual Spatial
> Data Access Method. They are all working correctly. However, when I
> test it through cwc2 or just plainly using WMS thru browser, they takes
> quite a long while to draw though. I am a newbie to GIS stuff and this
> new mapserver technology. I just wonder if there is any way that I can
> make it faster. Right now it seems to me that everytime mapserver needs
> to get all the needed data from Oracle database and draw them all from
> scratch. Does the mapserver suppose to work in this way or did I set up
> something wrongly?
We Wei,
Looking in the OGR Oracle driver code, I see that I "preserve" OCI
"environments", but create a new session for each time the datasource is
opened. MapServer will currently reopen the OGR datasource for each layer
accessed referring to that OGR datasource.
I believe at the time I was thinking that preserving the OCI environment
was going to avoid high cost operations later on. However, I am not at all
convinced I ever tested this assumption, and now I am not at all certain it
is true.
Can you construct a test map that would demonstrate whether the issue is
a high "logon" connection cost or if it is something else? A decent test
would be to create a table in Oracle with a single point feature. Then
add a layer rendering it. Test the time with one occurance of that layer,
then 5, 10, 15, 20. See the time is going up linearly.
If I am doing stuff in a smart way, the first layer should be slow, but
adding more copies of the same layer should take almost no time.
If it turns out the time is going up alot for each new layer, then I would
be willing to do some work on the OGR oracle driver, essentially for
connection pooling.
Best regards,
--
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush | Geospatial Programmer for Rent
More information about the MapServer-users
mailing list