Re: Hash partitioning.
От | Bruce Momjian |
---|---|
Тема | Re: Hash partitioning. |
Дата | |
Msg-id | 20130626125217.GA3341@momjian.us обсуждение исходный текст |
Ответ на | Re: Hash partitioning. (Kevin Grittner <kgrittn@ymail.com>) |
Список | pgsql-hackers |
On Tue, Jun 25, 2013 at 02:52:33PM -0700, Kevin Grittner wrote: > Claudio Freire <klaussfreire@gmail.com> wrote: > > > Did you try "select * from foo where (a % 16) = (1::int % 16)"? > > I did. Using Robert's hashed partitioning table definitions: > > test=# explain select * from foo where a = 1 and (a % 16) = (1 % 16); > QUERY PLAN > ------------------------------------------------------------ > Append (cost=0.00..31.53 rows=2 width=36) > -> Seq Scan on foo (cost=0.00..0.00 rows=1 width=36) > Filter: ((a = 1) AND ((a % 16) = 1)) > -> Seq Scan on foo1 (cost=0.00..31.53 rows=1 width=36) > Filter: ((a = 1) AND ((a % 16) = 1)) > (5 rows) > > So if you are generating your queries through something capable of > generating that last clause off of the first, this could work. Not OK, so what is it in our code that requires that? It is a type mismatch? -- Bruce Momjian <bruce@momjian.us> http://momjian.us EnterpriseDB http://enterprisedb.com + It's impossible for everything to be true. +
В списке pgsql-hackers по дате отправления: