On 01/17/2011 02:03 AM, Zotov wrote:
select c.id from OneRow c join abstract a on a.id=AsInteger(c.id)
OneRow Contains only one row,
abstract contains 22 953 500 rows
AsInteger is simple function on Delphi
it just return input value
Ok... there has to be some kind of misunderstanding, here.
2011/1/17 Tom Lane :
> Pavel Stehule writes:
>> it should to work without functional index - but not sure about effectivity
>
> As long as the function is VOLATILE, the planner can't use any
> intelligent query plan. Merge or hash join both require at least
> stable join keys.
sure, my first adv
Pavel Stehule writes:
> it should to work without functional index - but not sure about effectivity
As long as the function is VOLATILE, the planner can't use any
intelligent query plan. Merge or hash join both require at least
stable join keys.
regards, tom lane
--
Se
2011/1/17 Kevin Grittner :
> Zotov wrote:
>
>> select c.id from OneRow c join abstract a on a.id=AsInteger(c.id)
>
>> Why SeqScan???
>
> Because you don't have an index on AsInteger(c.id).
>
> If your function is IMMUTABLE (each possible combination of input
> values always yields the same result)
Zotov wrote:
> select c.id from OneRow c join abstract a on a.id=AsInteger(c.id)
> Why SeqScan???
Because you don't have an index on AsInteger(c.id).
If your function is IMMUTABLE (each possible combination of input
values always yields the same result), and you declare it such, then
you c
2011/1/17 Zotov :
> It`s just a sample.
>
> select c.id from OneRow c join abstract a on a.id=AsInteger(c.id)
>
> "Nested Loop (cost=0.00..786642.96 rows=1 width=4) (actual
> time=91021.167..119601.344 rows=1 loops=1)"
> " Join Filter: ((a.id)::integer = asinteger((c.id)::integer))"
> " -> Seq
It`s just a sample.
select c.id from OneRow c join abstract a on a.id=AsInteger(c.id)
"Nested Loop (cost=0.00..786642.96 rows=1 width=4) (actual
time=91021.167..119601.344 rows=1 loops=1)"
" Join Filter: ((a.id)::integer = asinteger((c.id)::integer))"
" -> Seq Scan on onerow c (cost=0.00.