Re: [PERFORM] From Simple to Complex

2012-02-02 Thread Merlin Moncure
On Wed, Feb 1, 2012 at 12:48 PM, Alessandro Gagliardi wrote: > LIMIT 65536; Total query runtime: 14846 ms. > - http://explain.depesz.com/s/I3E > LIMIT 69632: Total query runtime: 80141 ms. > - http://explain.depesz.com/s/9hp > > So it looks like when the limit crosses a certain threshold (somewher

[PERFORM] *really* bad insert performance on table with unique index

2012-02-02 Thread Jon Nelson
I created a table with two columns: an id SERIAL (primary key) and a text (not null), and then added a unique index on the text field. Then I ran the following query (with a huge work_mem - 20GB): insert into tableA (text_field) select distinct other_text_field from some_huge_set_of_tables After

Re: [PERFORM] From Simple to Complex

2012-02-02 Thread Alessandro Gagliardi
On Thu, Feb 2, 2012 at 6:52 AM, Merlin Moncure wrote: > also, is effective_cache_size set to a reasonable value? > > Yeah, it's 153kB

Re: [PERFORM] Index with all necessary columns - Postgres vs MSSQL

2012-02-02 Thread Merlin Moncure
On Thu, Feb 2, 2012 at 10:41 AM, Gudmundur Johannesson wrote: > Do you think I should try using the latest build of the source for 9.2 since > index-only-scan is "ready" according to > http://www.depesz.com/index.php/2011/10/08/waiting-for-9-2-index-only-scans/ > ? hm, interesting. You are simpl

Re: [PERFORM] *really* bad insert performance on table with unique index

2012-02-02 Thread Jeff Janes
On Thu, Feb 2, 2012 at 9:28 AM, Jon Nelson wrote: > I created a table with two columns: an id SERIAL (primary key) and a > text (not null), and then added a unique index on the text field. > Then I ran the following query (with a huge work_mem - 20GB): > > insert into tableA (text_field) select di