Comments (5)
  • Add a Comment
  • Edit
  • More Actions v
  • Quarantine this Entry

1 compaamat commented Permalink

Serge,

 
Just curious, shouldn't we be adding "WHEN 'microsecond' THEN date + number MICROSECONDS" to cover all cases consistently?
 
Thank you
"

2 SergeRielau commented Permalink

compaamat,

 
You are correct. I didn't provide the entire list here.
I also omitted week. Let me fix that.

3 compaamat commented Permalink

One more comment. . .

 
I would also change datepart to LOWER(datepart), because all key words in scripts are presumed to be non-case sensitive.
 
Thank you,
Alexander ashkenazi

4 SergeRielau commented Permalink

Actually that is not necessary since the invocation is using the variables which are case-insensitive.
I may just as well have used numbers as arguments.

5 mdkii commented Permalink

Hi Rielau,
Can I ask you some questions about the db2 optimizer here。
( i can not find any better place to diliver my question ).
because the documents about the db2 optimizer are very little.
There are two issues i am in recently:
1. I found db2 always use list prefetch to fetch data
even when the index clusterfactor is 1 after version 9.7.
I think we can use index scan + SEQUENTIAL prefetch to
fetch table data more efficiantly when we got a high
index clustorfactor. Is it a bug or is there any other consideration?

 
2. When we join two tables ( one of them is a data patition
table ), i found partition elimiate will happen only when
optimizer chose the nljoin. When using hash join. optimzer
always chose full table scan.That is ineffeciant。and I
think that is not very hard to implement. Why db2 did not
implement it ( oracle supports join partition elimiate
a long time ago ) .
 
Expecting for you reply
thanks a lot.