From: | Hans-Juergen Schoenig <postgres(at)cybertec(dot)at> |
---|---|
To: | Bruno Wolff III <bruno(at)wolff(dot)to> |
Cc: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Planner estimates and cast operations ,... |
Date: | 2006-09-04 17:09:16 |
Message-ID: | 89BBA24F-84F9-4A12-934A-F26AC74B29AB@cybertec.at |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Sep 4, 2006, at 7:04 PM, Bruno Wolff III wrote:
> On Mon, Sep 04, 2006 at 17:19:37 +0200,
> Hans-Juergen Schoenig <postgres(at)cybertec(dot)at> wrote:
>>
>> i thought about creating an index on the expression but the problem
>> is that this is hardly feasable.
>> in 8.0 (what i have here) this would block the table and i would run
>
> That may be hard to deal with.
>
it is ...
but the problem is not primarily that i have some problem with a
certain query. somehow this can be solved somehow. i am thinking
about GROUP BY and estimates in general here ...
just wondering if there is a chance to improve ...
>> out of disk space as well. this is a 600 gb biest :(
>
> I wouldn't expect this to be a problem. If you have 10^9 rows, I
> would expect
> the index to be less than 10% of you current size. If you are so
> close to
> your disk space limit that that is a problem, you have a problem in
> any case.
>
the index itself is not too large but when building it up it is
written several times. it is not funny when dealing with so much
data ...
>>
>> what about the planner approach?
>> this would solve the problem for some other issues as well. an index
>> might not be flexible enough :(.
>
> If you disable sorting you might be able to get it to switch plans.
> Lying
> about the amount of work memory so that the planner thinks the hash
> will fit in memory despite its misguessing the number of buckets
> might also
> help.
setting work_mem to 2gb does not help here ;)
set it to the max value on 8.0.
this was my first try too.
the problem is - there is no magic switch to mislead the planner a
little without hacking the system stats (which is not what people
should do i would say ;) ).
my question is: is adding hooks for selectivity a feasable way of
dealing with things like that?
hans
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2006-09-04 17:34:36 | Stopgap solution for ILIKE in multibyte encodings |
Previous Message | Robert Bernier | 2006-09-04 17:09:10 | Re: On Certification (was Re: [GENERAL] Thought provoking piece on NetBSD) |