Re: [PERFORM] Any disadvantages of using =ANY(ARRAY()) instead of IN?

2012-05-13 Thread Noah Misch
On Tue, May 01, 2012 at 04:34:10PM +0200, Clemens Eisserer wrote: > select . from table1 ... left outer join table 15 WHERE > table1.id IN (select id join table16 ... join table20 WHERE > table20.somevalue=?) > > Starting with some amount of joins, the optimizer starts to do quite >

Re: [PERFORM] Any disadvantages of using =ANY(ARRAY()) instead of IN?

2012-05-10 Thread Noah Misch
On Tue, May 01, 2012 at 04:34:10PM +0200, Clemens Eisserer wrote: > Quite often Hibernate ends up generating queries with a lot of joins > which usually works well, except for queries which load some > additional data based on a previous query (SUBSELECT collections), > which look like: > > select

Re: [PERFORM] Exhaustive list of what takes what locks

2011-02-22 Thread Noah Misch
On Tue, Feb 22, 2011 at 10:18:36PM -0500, Robert Haas wrote: > On Wed, Feb 2, 2011 at 12:20 AM, Noah Misch wrote: > >> CREATE TABLE account (account_id SERIAL PRIMARY KEY, name CHARACTER VARYING > >> NOT NULL); > >> CREATE TABLE foo (account_id INTEGER NOT NULL REFER

Re: [PERFORM] Exhaustive list of what takes what locks

2011-02-03 Thread Noah Misch
On Tue, Feb 01, 2011 at 02:18:37PM -0500, Nikolas Everett wrote: > Is there an exhaustive list of what takes what locks and how long they last? This documents which commands take each lock type, but it is not exhaustive: http://www.postgresql.org/docs/current/interactive/explicit-locking.html All