<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content="text/html; charset=iso-8859-1" http-equiv=Content-Type>
<META name=GENERATOR content="MSHTML 8.00.6001.19046">
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Garamond>
<DIV><FONT face=Garamond>Greetings. I am hoping that I have posted
this on the most appropriate list, please let me know if I should be
posting to a different list. </FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Garamond>In our Mapserver application, we join a lot of tables
together - generally one table with geometry to a "flat" table with
tabular data. My question is - is it more efficient/faster to create
a view in PostgreSQL doing the join and link to the view table from
Mapserver or to define the join (SQL statement) with Mapserver in
the data definition within the layer definition? Does it even matter
because Mapserver sends the request to PostgreSQL/GIS? </FONT></DIV>
<DIV><FONT face=Garamond></FONT> </DIV>
<DIV><FONT face=Garamond>Also, we have joins that take a field within the flat
table to determine which table to join to get geometry. For example,
if the flat table column "join" value is equal to 1 then it joins to
"table1" to get geometry or if column "join" value is equal to 2 then it joins
to "table2" to get geometry. I read something that you were not supposed to use
WHERE clauses in the Mapserver data definition. Would this be better to do
as a view and link to the view table from the data definition?</FONT></DIV>
<DIV><FONT face=Garamond></FONT> </DIV>
<DIV><FONT face=Garamond>Any advice would be greatly appreciated. Thanks
in advance!</FONT></DIV>
<DIV><FONT face=Garamond>Dara</FONT></DIV></FONT></DIV></BODY></HTML>