Re: [Geotools-devel] Parametric SQL views, this time for good

2010-06-23 Thread christian . mueller
No, no, there is nothing special about DB2 (except the details, of course). I did my vote +0, Andrea can go on. For providing the parameters I cite Andrea "it's there where you'd expect it to be, in the Query" and that is my preference. Quoting Jody Garnett : > So to bring things back on

Re: [Geotools-devel] Parametric SQL views, this time for good

2010-06-23 Thread Jody Garnett
So to bring things back on track; Christian how are you doing with the idea being put forth - is it actually going to cause trouble for DB2? Or is it something that DB2 needs to handle differently. Jody On 23/06/2010, at 2:26 PM, christian.muel...@nvoe.at wrote: > Some clarifications. DB2 make

Re: [Geotools-devel] Parametric SQL views, this time for good

2010-06-22 Thread christian . mueller
Some clarifications. DB2 makes also makes an access plan, but for one statement, you have different access plans for different distribution statistics. A simple example having a table with some indexes. If the table is populated with 50 rows, no index will be used, if it is populated with 1

Re: [Geotools-devel] Parametric SQL views, this time for good

2010-06-22 Thread Andrea Aime
christian.muel...@nvoe.at ha scritto: > Puuh, a long mail, I will try to keep it short. > > 1) Each db engine has its own optimizer, DB2 as an example has a cost > based optimizer (not rule based) using indices based on distribution > statistics. Creating an and index for a char(1) field havi

Re: [Geotools-devel] Parametric SQL views, this time for good

2010-06-22 Thread christian . mueller
Puuh, a long mail, I will try to keep it short. 1) Each db engine has its own optimizer, DB2 as an example has a cost based optimizer (not rule based) using indices based on distribution statistics. Creating an and index for a char(1) field having values "Y" and "N" will have no sense, DB

Re: [Geotools-devel] Parametric SQL views, this time for good

2010-06-22 Thread Andrea Aime
christian.muel...@nvoe.at ha scritto: > Some thoughts from my side. > > 1) Using a regexp to avoid sql injection is a nice idea. But I think > most developers are not familiar with regexps and thus, the regexp > mostly used will be ".*" opening the door for all kind of sql > injection attacks.

Re: [Geotools-devel] Parametric SQL views, this time for good

2010-06-21 Thread Andrea Aime
Andrea Aime ha scritto: > Andrea Aime ha scritto: >> Andrea Aime ha scritto: >>> christian.muel...@nvoe.at ha scritto: Some thoughts from my side. 1) Using a regexp to avoid sql injection is a nice idea. But I think most developers are not familiar with regexps and thus, the re

Re: [Geotools-devel] Parametric SQL views, this time for good

2010-06-21 Thread Andrea Aime
Andrea Aime ha scritto: > Andrea Aime ha scritto: >> christian.muel...@nvoe.at ha scritto: >>> Some thoughts from my side. >>> >>> 1) Using a regexp to avoid sql injection is a nice idea. But I think >>> most developers are not familiar with regexps and thus, the regexp >>> mostly used will be "

Re: [Geotools-devel] Parametric SQL views, this time for good

2010-06-21 Thread Andrea Aime
Andrea Aime ha scritto: > christian.muel...@nvoe.at ha scritto: >> Some thoughts from my side. >> >> 1) Using a regexp to avoid sql injection is a nice idea. But I think >> most developers are not familiar with regexps and thus, the regexp >> mostly used will be ".*" opening the door for all kin

Re: [Geotools-devel] Parametric SQL views, this time for good

2010-06-21 Thread Andrea Aime
christian.muel...@nvoe.at ha scritto: > Some thoughts from my side. > > 1) Using a regexp to avoid sql injection is a nice idea. But I think > most developers are not familiar with regexps and thus, the regexp > mostly used will be ".*" opening the door for all kind of sql injection > attacks.

Re: [Geotools-devel] Parametric SQL views, this time for good

2010-06-21 Thread christian . mueller
Some thoughts from my side. 1) Using a regexp to avoid sql injection is a nice idea. But I think most developers are not familiar with regexps and thus, the regexp mostly used will be ".*" opening the door for all kind of sql injection attacks. Why not use prepared (callable) statements ?.

Re: [Geotools-devel] Parametric SQL views, this time for good

2010-06-21 Thread Jody Garnett
Thanks Andrea that helped; that is actually a match with with BIRT does in their various query builders; indeed your work would ease integration greatly. Jody On 21/06/2010, at 11:18 PM, Andrea Aime wrote: > Jody Garnett ha scritto: >> Hi Andera: >> This is exciting; I am still sorting out the

Re: [Geotools-devel] Parametric SQL views, this time for good

2010-06-21 Thread Andrea Aime
Jody Garnett ha scritto: > Hi Andera: > > This is exciting; I am still sorting out the context of how this is > to be used at the end of the day. Is this something like the WFS 2.0 > "predefined queries" (I always thought those were more for prepared > statements but setting up something in the mi

Re: [Geotools-devel] Parametric SQL views, this time for good

2010-06-21 Thread Jody Garnett
Hi Andera: This is exciting; I am still sorting out the context of how this is to be used at the end of the day. Is this something like the WFS 2.0 "predefined queries" (I always thought those were more for prepared statements but setting up something in the middleware is more sane actually) O

[Geotools-devel] Parametric SQL views, this time for good

2010-06-21 Thread Andrea Aime
Hi, some time ago I've sent this message to the mailing list, and only Michael answered. I'm quite likely to get funding to implement it, so please, if you have feedback, speak :-) --- Hi, as you all probably know thanks to Michael work we