more than one oraclespatial connection

Fernando Simon fsimon at UNIVALI.BR
Thu Jan 6 06:33:18 EST 2005


Hi folks,
    I don't believe that can be a mapserver error, here I use
mapfiles
with more than 30 layers using the same conection.
    I believe that can be a SQL error, directly in Oracle. Sometimes
one recursive sql or table definitions can generate this problems,
you can recreate the index or renew the statistics.
    But can be a error with spatial index, did you created the
spatial
index for this table? I believe that yes. How you defined the spatial
index? How you imported this data for database, sqlldr?
    You can see the internal SQL defining a wrong data string. You
can
change "GEOM FROM LOCATIE USING UNIQUE LOCATIE_ID SRID 90112" to DATA
"GEO FROM LOCATIE USING UNIQUE LOCATIE_ID SRID 90112". Using this the
mapserver/maporaclesptial in cgi mode generate one output with the
problem and return the internal sql. And after this you can use this
SQl in sqlplus to test.
    Another way can be using subselect for data string, you can do
this, change: "GEOM FROM LOCATIE USING UNIQUE LOCATIE_ID SRID 90112"
to: "GEOM FROM (SELECT GEOM, LOCATIE_ID, LOCATIESOORT_ID FROM
LOCATIE)
USING UNIQUE LOCATIE_ID SRID 90112" or defining your filter directly
in your subselect: "GEOM FROM (SELECT GEOM, LOCATIE_ID,
LOCATIESOORT_ID FROM LOCATIE WHERE LOCATIESOORT_ID = 1) USING UNIQUE
LOCATIE_ID SRID 90112". Or for more security: "GEOM FROM (SELECT GEOM
AS GEOM, LOCATIE_ID AS LOCATIE_ID, LOCATIESOORT_ID AS LOCATIESOORT_ID
FROM LOCATIE)
USING UNIQUE LOCATIE_ID SRID 90112"
    I believe that can be a oracle problem but can you test this
hints?
    Thanks.

-------------------------------------------------
Fernando Simon
Mapserver and Oracle Spatial developer
G10 - Laboratório de Computação Aplicada - Brazil
http://g10.cttmar.univali.br
-------------------------------------------------

Citando Bart van den Eijnden <bartvde at XS4ALL.NL>:

> > Both layers connect to the same database and the same table, can
> that be a
> > problem?
>
> Hi Merlijn,
>
> I don't think this is the problem, in my testcase I have the exact
> same
> situation and it works fine.
>
> What happens if you create two identical layers using a different
> name,
> and first check if one the layer definitions works? Does it crash
> then as
> well?
>
> What's your environment (Windows/Linux) and are you using
> pre-compiled
> binaries or your own binaries?
>
> Best regards,
> Bart
>
> > Hi Bart,
> >
> > Thanks for your reply.
> >
> > I’ve already tried this DATA statement, but it doesn’t make any
> > difference. As soon as two layers are drawn in the requested
> scale the map
> > doesn’t get rendered anymore.
> >
> > Both layers connect to the same database and the same table, can
> that be a
> > problem?
> >
> > Kind regards,
> > Merlijn
> >
> >>
> >> Hi Merlijn,
> >>
> >> I just tested in my setup and everything works fine when I
> >> have 2 layers connecting to Oracle with a different filter.
> >>
> >> Maybe you should change your DATA statement to something similar
> like:
> >>
> >> DATA "LOCATIE FROM (SELECT * FROM GEMEENTEN) USING UNIQUE ID
> >> SRID 90112"
> >>
> >> If you filter a dataset on an item, you need to include that
> >> column in your select.
> >>
> >> Best regards,
> >> Bart
> >>
> >> > Hi All,
> >> >
> >> > Yesterday I have installed the new Mapserver 4.4.1 windows
> >> binary with
> >> > oracle support. To test its performance I’ve first changed
> >> my slowest
> >> > layer to connect directly to OracleSpatial in stead of through
> OGR.
> >> > This is a very huge improvement. The map draws about 3 to 4
> >> times as
> >> > fast, WOW!. Enthusiastic as I was I also changed the other
> >> layers to
> >> > connect to OracleSpatial directly, but here my problem
> started. As
> >> > soon as more than one layer connects to OracleSpatial
> directly, the
> >> > map doesn’t finish rendering. On my server a gif-image
> >> (size is 0Kb)
> >> > is made. MapServ.exe keeps running (0 CPU) and the image is
> never
> >> > finished.
> >> >
> >> > These are my connection parameters:
> >> > LAYER
> >> >   CONNECTIONTYPE oraclespatial
> >> >   CONNECTION "user/pass at db> >> >   DATA "GEOM FROM LOCATIE USING UNIQUE LOCATIE_ID SRID 90112"
> >> >   FILTER "LOCATIESOORT_ID = 0"
> >> >
> >> >   ...
> >> >
> >> > END
> >> >
> >> > LAYER
> >> >   CONNECTIONTYPE oraclespatial
> >> >   CONNECTION "user/pass at db> >> >   DATA "GEOM FROM LOCATIE USING UNIQUE LOCATIE_ID SRID 90112"
> >> >   FILTER "LOCATIESOORT_ID = 1"
> >> >
> >> >   ...
> >> >
> >> > END
> >> >
> >> >
> >> > Does anyone have an idea if this is a bug or if I am
> forgetting
> >> > something in my mapfile?
> >> >
> >> > Thanks for any comments.
> >> >
> >> > Merlijn Simonse
> >
> >
>




-------------------------------------------------
  Univali - Webmail - http://webmail.univali.br



More information about the mapserver-users mailing list