<!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.&nbsp; I am hoping that I&nbsp;have posted 
this on the most appropriate list, please let me know if I should be 
posting&nbsp;to a different list. </FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=Garamond>In our Mapserver application, we join a lot of tables 
together -&nbsp;generally one table&nbsp;with geometry to a "flat" table with 
tabular data.&nbsp; My question is - is it more efficient/faster&nbsp;to create 
a view in&nbsp;PostgreSQL doing the join and link to the view table&nbsp;from 
Mapserver&nbsp;or to define the&nbsp;join (SQL statement)&nbsp;with Mapserver in 
the data definition&nbsp;within the layer definition? Does it even matter 
because Mapserver sends the request to PostgreSQL/GIS? </FONT></DIV>
<DIV><FONT face=Garamond></FONT>&nbsp;</DIV>
<DIV><FONT face=Garamond>Also, we have joins that take a field within the flat 
table&nbsp;to determine which table to join to get geometry.&nbsp; For example, 
if the flat table column "join" value is equal to&nbsp;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.&nbsp; 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>&nbsp;</DIV>
<DIV><FONT face=Garamond>Any advice would be greatly appreciated.&nbsp; Thanks 
in advance!</FONT></DIV>
<DIV><FONT face=Garamond>Dara</FONT></DIV></FONT></DIV></BODY></HTML>