|
osdir.com mailing list archive F.A.Q. -since 2001! |
|
|
|
Subject: RE: Slow Oracle connection - msg#00245List: gis.mapserver.user
by Date: Prev Next Date Index by Thread: Prev Next Thread Index
Hello everyone,
I did not see my reply back to Frank in today's digest so I fear it has not been published. Since there are some very interesting info in it (mainly the results of Frank's comments) , I'm taking the chance of republishing it again. Sorry if we end up with the same message twice... thanks, JF Canadian Coast Guard coutujf@xxxxxxxxxxxxx ------------------------------------------------------------------------ Dear Frank, adding the name of the table to the ovf file did the trick. Plus, I don't get the funny table names with the accents anymore... There are a lots of tables in this database, but the table I'm trying to connect to only has about 4000 records. The problem I have now, is that my ogrinfo requests are good and quite fast (couple of seconds...) but my MapServer requests still take forever (and actually never comes back..). Here is the ogrinfo output: INFO: Open of `sipa.ovf' using driver `VRT' successful. 1: SIPAQBC (Point) IF I take a look at the ODBC log file I seem to get stuck at the login: (and again that is only using MapServer, everything is fine with ogrinfo) mapserv 284-be4 ENTER SQLAllocEnv HENV * 013E4850 mapserv 284-be4 EXIT SQLAllocEnv with return code 0 (SQL_SUCCESS) HENV * 0x013E4850 ( 0x00961738) mapserv 284-be4 ENTER SQLAllocConnect HENV 00961738 HDBC * 013E4854 mapserv 284-be4 EXIT SQLAllocConnect with return code 0 (SQL_SUCCESS) HENV 00961738 HDBC * 0x013E4854 ( 0x009617e0) mapserv 284-be4 ENTER SQLSetConnectOption HDBC 009617E0 UWORD 103 <SQL_LOGIN_TIMEOUT> SQLLEN 5 mapserv 284-be4 EXIT SQLSetConnectOption with return code 0 (SQL_SUCCESS) HDBC 009617E0 UWORD 103 <SQL_LOGIN_TIMEOUT> SQLLEN 5 mapserv 284-be4 ENTER SQLConnectW HDBC 009617E0 WCHAR * 0x00961910 [ -3] "SIPA\ 0" SWORD -3 WCHAR * 0x1F7C4AA0 [ -3] "******\ 0" SWORD -3 WCHAR * 0x1F7C4AA0 [ -3] "******\ 0" SWORD -3 Here is my .map layer in case that's where the problem lies (but I doubt it): LAYER NAME SIPA TYPE POINT CONNECTIONTYPE OGR CONNECTION "sipa.ovf" DATA "SIPAQBC" STATUS ON PROJECTION "init=epsg:4326" END TOLERANCE 5 CLASS SYMBOL mapinfo-sym-34 SIZE 9 COLOR 255 0 0 END END any ideas? thanks, JF Canadian Coast Guard coutujf@xxxxxxxxxxxxx -----Message d'origine----- De : Frank Warmerdam [mailto:warmerdam@xxxxxxxxx] Envoyé : Thursday, July 08, 2004 10:12 AM À : COUTUJF@xxxxxxxxxxxxx Cc : mapserver-users@xxxxxxxxxxxxxxxxx Objet : Re: [Mapserver-users] Slow Oracle connection COUTUJF@xxxxxxxxxxxxx wrote: > Hello, > I'm trying to connect to an Oracle (not spatial) through an ovf file > and ODBC. I tested the DSN with Access and everything is ok and runs fast. > When I'm testing my connection with "ogrinfo sipa.ovf", the connection does > occur but it's so slow. It can take up to 15 minutes to get the info back!!! > > Using the same connection with MapServer is not better. I probably hit a > timeout before anything can be drawn. > > The table scheme is called SIPAQBC and the name of the table is MARINFO so > here is my ovf file: > > <OGRVRTDataSource> > <OGRVRTLayer name="SIPAQBC"> > <SrcDataSource>ODBC:SIPAQBC/SIPAQBC@SIPA</SrcDataSource> > <SrcLayer>MARINFO</SrcLayer> > <GeometryType>wkbPoint</GeometryType> > <LayerSRS>WGS84</LayerSRS> > <GeometryField encoding="PointFromColumns" x="LONGITUDE" y="LATITUDE"/> > </OGRVRTLayer> > </OGRVRTDataSource> > > The funny thing is that the output of the "ogrinfo sipa.ovf" command always > begins with: > > ERROR 4: Update access not supported for VRT datasources. JF, You can use the -ro (read only) flag with ogrinfo to avoid first trying to open the source in update mode. > ERROR 1: No column definitions found for table 'Activit?', layer not usable. > ERROR 1: No column definitions found for table 'Activit? CPA', layer not I'm not excactly sure what is happening here. Do you have any table(s) with accents in the table names? It almostly looks as if the table name had an accent converted into a "?" during reading and this made it impossible to query for the table field list. As to your general problem, I am not certain why but I wouldn't be surprised to find that alot of time is being spent scanning the layer list or doing the spatial extents/feature count required by ogrinfo. The first two things that ogrinfo reports for a layer are the feature count and geographic extents. It can require two complete passes through the table to collect this information. Are there alot of records in your table? If the problem is that there are alot of tables in your database, then you can just list the tables you want to access in your connection string. eg. <SrcDataSource>ODBC:SIPAQBC/SIPAQBC@SIPA,MARINFO</SrcDataSource> Note that I don't think MapServer normally queries for feature count or geographic extents so that slowdown in ogrinfo won't occur in MapServer. Best regards, -- ---------------------------------------+------------------------------------ -- I set the clouds in motion - turn up | Frank Warmerdam, warmerdam@xxxxxxxxx light and sound - activate the windows | http://pobox.com/~warmerdam and watch the world go round - Rush | Geospatial Programmer for Rent
Thread at a glance:
Previous Message by Date:Re: symbol questionyes i am using mapscript i ve already developped a function wich calculate each triangle but i think there is better to do what's your mind? fx ----- Original Message ----- From: "Vladimir Guzmán" <bigfoot@xxxxxxxxxxxxx> To: "fx gamoy" <fx.gamoy@xxxxxxxxxxxxx> Cc: <mapserver-users@xxxxxxxxxxxxxxxxx> Sent: Friday, July 09, 2004 10:38 PM Subject: Re: [Mapserver-users] symbol question > fx gamoy wrote: > > > Hello world, > > i'd like to obtain lines with oriented triangle in order to show the > > direction of a track. > > I have made several test but nothing very interesting.. > > thanks in advance.. > > fx > > Are you using mapscript? > > -- > Vladimir Ilich Guzmán R. > ------------------------ > http://maintask.com > > _______________________________________________ > Mapserver-users mailing list > Mapserver-users@xxxxxxxxxxxxxxxxx > http://lists.gis.umn.edu/mailman/listinfo/mapserver-users > Next Message by Date:4.2 Migration -> symbols and truetype labelsListers, I'm in the process of upgrading an App from MS 3.5 to the most recent 4.2 . I'm working my way through the migration guide to 4.x, and thus far the changes are making sense. However, I have found one change that I do not know the solution for: it involves the case when using a symbol to display point data and also labeling the points using a trutype font. I found a similar case in the archives at: http://mapserver.gis.umn.edu/data2/wilma/mapserver-users/0306/msg00447.html ... but no solution was posted in response. The problem layer definition is below. If this layer is called "ON", then the App will fail with the message: "Fatal error: Call to a member function on a non-object..". If status is simply left "OFF" then the map will load just fine. Can anyone point out the problem ? Tanya -------------layer def-------------> LAYER NAME acetate2 STATUS OFF TYPE POINT LABELITEM "NAME" CLASSITEM "Population" DATA "D:\gis\pops.shp" MINSCALE 5000 MAXSCALE 2000000 CLASS EXPRESSION ([Population]< 1000) SYMBOL 'dot' SIZE 1 LABEL COLOR 0 0 0 OUTLINECOLOR 255 255 255 SIZE 6 TYPE TRUETYPE FONT tahoma POSITION CR END END CLASS EXPRESSION ([Population]> 1000 AND [Population]< 2000) LABEL ANGLE AUTO COLOR 0 0 0 OUTLINECOLOR 255 255 255 SIZE 7 TYPE TRUETYPE FONT tahoma POSITION CC END END CLASS EXPRESSION ([Population]> 2000 AND [Population]< 3000) LABEL ANGLE AUTO COLOR 0 0 0 OUTLINECOLOR 255 255 255 SIZE 8 TYPE TRUETYPE FONT ARIAL_NB POSITION CC END END END Previous Message by Thread:RE: Slow Oracle connectionFrank, In the future to avoid this on large tables in oracle, you could get the extents from the sdo_geom_metadata_table and get the row_count from the data_dictionary. That would be a lot faster. Mike Smith GIS Specialist/Physical Scientist/Oracle Developer Remote Sensing/GIS Center of Expertise Army Engineer Research & Development Center Hanover, NH (603) 646-4765 michael.smith@xxxxxxxxxxxxxxxxxxx -----Original Message----- From: Frank Warmerdam [mailto:warmerdam@xxxxxxxxx] Sent: Thursday, July 08, 2004 10:12 AM To: COUTUJF@xxxxxxxxxxxxx Cc: mapserver-users@xxxxxxxxxxxxxxxxx Subject: Re: [Mapserver-users] Slow Oracle connection COUTUJF@xxxxxxxxxxxxx wrote: > Hello, > I'm trying to connect to an Oracle (not spatial) through an ovf file > and ODBC. I tested the DSN with Access and everything is ok and runs fast. > When I'm testing my connection with "ogrinfo sipa.ovf", the connection > does occur but it's so slow. It can take up to 15 minutes to get the info back!!! > > Using the same connection with MapServer is not better. I probably hit > a timeout before anything can be drawn. > > The table scheme is called SIPAQBC and the name of the table is > MARINFO so here is my ovf file: > > <OGRVRTDataSource> > <OGRVRTLayer name="SIPAQBC"> > <SrcDataSource>ODBC:SIPAQBC/SIPAQBC@SIPA</SrcDataSource> > <SrcLayer>MARINFO</SrcLayer> > <GeometryType>wkbPoint</GeometryType> > <LayerSRS>WGS84</LayerSRS> > <GeometryField encoding="PointFromColumns" x="LONGITUDE" > y="LATITUDE"/> </OGRVRTLayer> </OGRVRTDataSource> > > The funny thing is that the output of the "ogrinfo sipa.ovf" command > always begins with: > > ERROR 4: Update access not supported for VRT datasources. JF, You can use the -ro (read only) flag with ogrinfo to avoid first trying to open the source in update mode. > ERROR 1: No column definitions found for table 'Activit?', layer not usable. > ERROR 1: No column definitions found for table 'Activit? CPA', layer > not I'm not excactly sure what is happening here. Do you have any table(s) with accents in the table names? It almostly looks as if the table name had an accent converted into a "?" during reading and this made it impossible to query for the table field list. As to your general problem, I am not certain why but I wouldn't be surprised to find that alot of time is being spent scanning the layer list or doing the spatial extents/feature count required by ogrinfo. The first two things that ogrinfo reports for a layer are the feature count and geographic extents. It can require two complete passes through the table to collect this information. Are there alot of records in your table? If the problem is that there are alot of tables in your database, then you can just list the tables you want to access in your connection string. eg. <SrcDataSource>ODBC:SIPAQBC/SIPAQBC@SIPA,MARINFO</SrcDataSource> Note that I don't think MapServer normally queries for feature count or geographic extents so that slowdown in ogrinfo won't occur in MapServer. Best regards, -- ---------------------------------------+-------------------------------- ---------------------------------------+------ I set the clouds in motion - turn up | Frank Warmerdam, warmerdam@xxxxxxxxx light and sound - activate the windows | http://pobox.com/~warmerdam and watch the world go round - Rush | Geospatial Programmer for Rent _______________________________________________ Mapserver-users mailing list Mapserver-users@xxxxxxxxxxxxxxxxx http://lists.gis.umn.edu/mailman/listinfo/mapserver-users Next Message by Thread:Rosa applet and Virtual machinesHi all, has anyone tested rosa applet performance with Microsoft Virtual Machine and Sun Java Virtual Machine? It seems that MVM is faster and more stable but maybe I have to set up some options in Sun JVM. Thanks for any help Valerio Noti
blog comments powered by Disqus
|
|