2008/11/15 David Rowley <[EMAIL PROTECTED]>:
> Hitoshi Harada wrote:
>> > david=# explain select date,lag(date,1) over (order by date) from
>> > meter_Readings order by date;
>> > QUERY PLAN
>> > ---
Hitoshi Harada wrote:
> > david=# explain select date,lag(date,1) over (order by date) from
> > meter_Readings order by date;
> > QUERY PLAN
> >
>
> > --
2008/11/10 David Rowley <[EMAIL PROTECTED]>:
> Hitoshi Harada wrote:
>> I found how to do it, though it's only on the case you gave. Thinking
>> about the planner optimization of the Window nodes (and its attached
>> Sort nodes), we must consider the execution order of more than one
>> node. In the
Hitoshi Harada wrote:
> I found how to do it, though it's only on the case you gave. Thinking
> about the planner optimization of the Window nodes (and its attached
> Sort nodes), we must consider the execution order of more than one
> node. In the test case we only take care of only one window, bu
Hitoshi Harada wrote:
> I found how to do it, though it's only on the case you gave. Thinking
> about the planner optimization of the Window nodes (and its attached
> Sort nodes), we must consider the execution order of more than one
> node. In the test case we only take care of only one window, bu
Hitoshi Harada wrote:
> >> > Test 3 and 5 did not seem to make use of an index to get a sorted
> list
> >> of
> >> > results. I disabled enable_seqscan but the planner still failed to
> >> choose
> >> > index_scan. Is there any reason for this? Perhaps I'm missing
> something.
> >> > Hitoshi, can y
2008/11/2 David Rowley <[EMAIL PROTECTED]>:
> Hitoshi Harada Wrote:
>> 2008/11/2 David Rowley <[EMAIL PROTECTED]>:
>> > Obervations:
>> >
>> > Test 3 and 5 did not seem to make use of an index to get a sorted list
>> of
>> > results. I disabled enable_seqscan but the planner still failed to
>> choo
Hitoshi Harada Wrote:
> Thanks for your test. Didn't post publicly, I've also tested real
> problems and performed better than I thought. If you can afford it,
> could you add selfjoin cases? It's like:
Ok, did self joins with some. I don't know if it's possible with all.
Test Sub query Self jo
2008/11/2 David Rowley <[EMAIL PROTECTED]>:
> Obervations:
>
> Test 3 and 5 did not seem to make use of an index to get a sorted list of
> results. I disabled enable_seqscan but the planner still failed to choose
> index_scan. Is there any reason for this? Perhaps I'm missing something.
> Hitoshi,
Just a small correction: there should be time::text>>>'prev_time' for the
calculations to be correct:
select *
from (
select (((case when time::text = <<<'prev_time' then *0* else *1*
end)+(<<<'dense_rank')::int4)::text>>>'dense_rank')::int4 as position,
runnerid, time, time::text>>>'prev_
Here is another way to solve "big marathon" without window functions (and
many other kinds of "windowing" queries, especially those that do not
specify "rows preceeding" etc.).
It could be considered as a very dirty hack, however it could give you an
insight on the performance of the "windowed" qu
11 matches
Mail list logo