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 test case
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, but
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, but
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 you take a look at this?
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
choose
index_scan. Is
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 join
All,
This is my first patch review for PostgreSQL. I did submit a patch last
commit fest (Boyer-Moore) so I feel I should review one this commit fest.
I'm quite new to PostgreSQL so please don't rely on me totally. I'll do my
best. Heikki is also reviewing this patch which makes me feel better.
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 query
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_time'
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, can you
12 matches
Mail list logo