Prev: how to view a vertical table in horizontal way
Next: REplication of DB2 V9.7 tables with XML columns
From: Serge Rielau on 25 Jan 2010 07:29 On 1/24/2010 8:25 PM, Hardy wrote: > On 1月25日, 上午6时46分, Serge Rielau<srie...(a)ca.ibm.com> wrote: >> On 1/24/2010 7:11 AM, Hardy wrote:> On 1月23日, 下午2时50分, Serge Rielau<srie...(a)ca.ibm.com> wrote: >>>> Indeed. Wait until you see FP2. More good stuff. :-) >> >>>> -- >>>> Serge Rielau >>>> SQL Architect DB2 for LUW >>>> IBM Toronto Lab >> >>> wow~ The curiority can kill a cat. Before you can give me a ppt, a >>> question, is there any plan for something like Oralce pipeline >>> feature? >> >> Do you mean pipelines table functions? >> If I understand them correctly they are a pretty good match to a Java or >> C Table function in DB2 which is also pipelined. >> >> Cheers >> Serge >> >> -- >> Serge Rielau >> SQL Architect DB2 for LUW >> IBM Toronto Lab > > > yes, by this way database can process query in a more memory-saving > and even potentialy more efficent way. Serge, could you give some > example to use java/c table function to pipeline the data? Thanks. There should be examples in sqllib/samples/c and java Essentially the table function gets called with a "mode". So the body typically has a switch statement over the mode. Modes are: FIRST, FINAL and "regular". So every invocation the function generates one row. In newer versions of DB2 that can also be doe in parallel in a DPF environment. An Oracle pipelined table function essentially is a loop where rows are individually returned. So teh difference is that the loop is within the body while in DB2 the loop is driven by the system. Both operate "one-row-at-a-time". Cheers Serge PS: There are surprisingly few uses of PL/SQL pipelined functions that I see which is why they are low priority from an Oracle application enablement point of view. E.g. defaults for function parameters are much more pervasive. -- Serge Rielau SQL Architect DB2 for LUW IBM Toronto Lab
From: Hardy Wang on 25 Jan 2010 09:09 "Serge Rielau" <srielau(a)ca.ibm.com> 写入消息 news:7s5h5aFe4nU1(a)mid.individual.net... > On 1/24/2010 8:25 PM, Hardy wrote: >> On 1月25日, 上午6时46分, Serge Rielau<srie...(a)ca.ibm.com> wrote: >>> On 1/24/2010 7:11 AM, Hardy wrote:> On 1月23日, 下午2时50分, Serge >>> Rielau<srie...(a)ca.ibm.com> wrote: >>>>> Indeed. Wait until you see FP2. More good stuff. :-) >>> >>>>> -- >>>>> Serge Rielau >>>>> SQL Architect DB2 for LUW >>>>> IBM Toronto Lab >>> >>>> wow~ The curiority can kill a cat. Before you can give me a ppt, a >>>> question, is there any plan for something like Oralce pipeline >>>> feature? >>> >>> Do you mean pipelines table functions? >>> If I understand them correctly they are a pretty good match to a Java or >>> C Table function in DB2 which is also pipelined. >>> >>> Cheers >>> Serge >>> >>> -- >>> Serge Rielau >>> SQL Architect DB2 for LUW >>> IBM Toronto Lab >> >> >> yes, by this way database can process query in a more memory-saving >> and even potentialy more efficent way. Serge, could you give some >> example to use java/c table function to pipeline the data? Thanks. > There should be examples in sqllib/samples/c and java > > Essentially the table function gets called with a "mode". So the body > typically has a switch statement over the mode. > Modes are: FIRST, FINAL and "regular". > So every invocation the function generates one row. > In newer versions of DB2 that can also be doe in parallel in a DPF > environment. > An Oracle pipelined table function essentially is a loop where rows are > individually returned. So teh difference is that the loop is within the > body while in DB2 the loop is driven by the system. Both operate > "one-row-at-a-time". > > Cheers > Serge > > PS: There are surprisingly few uses of PL/SQL pipelined functions that I > see which is why they are low priority from an Oracle application > enablement point of view. E.g. defaults for function parameters are much > more pervasive. > > > > > -- > Serge Rielau > SQL Architect DB2 for LUW > IBM Toronto Lab > um, I'll study the samples. my experience focused much more on DBA things than on developer things. I should do more homework:)
First
|
Prev
|
Pages: 1 2 3 Prev: how to view a vertical table in horizontal way Next: REplication of DB2 V9.7 tables with XML columns |