Re: algebraic rewriting
От | sophie yang |
---|---|
Тема | Re: algebraic rewriting |
Дата | |
Msg-id | 20020420015950.85083.qmail@web10501.mail.yahoo.com обсуждение исходный текст |
Ответ на | Re: algebraic rewriting (Tom Lane <tgl@sss.pgh.pa.us>) |
Ответы |
Re: algebraic rewriting
|
Список | pgsql-novice |
What I mean about "algebraic rewriting" is some rule-based simplification optimization. For example, Say we have two relations: R(A, B), S(B, C). Simplification rules include: 1) R join R = R 2) R - R = NULL 3) NULL join R = NULL 4) SELECT[A=a](R join S) = (SELECT[A=a](R)) join S e.g. (select * from R, S where R.B=S.B and R.A=a) => (select * from R, S where R.A=a and R.B=S.B) 5) PROJECT[A,B](R JOIN S) = R JOIN (PROJECT[B](S)) 6) PROJECT[A](PROJECT[A,B](R)) = PROJECT[A](R) etc. I am wondering if progreSQL does such simplification to prune the plan space before estimate costs? Sophie Yang --- Tom Lane <tgl@sss.pgh.pa.us> wrote: > sophie yang <yangsophie@yahoo.com> writes: > > rewriter, optimizer and executor. I am wondering > at > > which step, PostgreSQL performs algebraic > rewriting? > > What do you consider "algebraic rewriting"? The > optimizer does a pass of > constant-subexpression simplification, and also some > boolean-expression > normalization, but I'm not sure if that's what > you're looking for. > > regards, tom lane > > ---------------------------(end of > broadcast)--------------------------- > TIP 5: Have you checked our extensive FAQ? > > http://www.postgresql.org/users-lounge/docs/faq.html __________________________________________________ Do You Yahoo!? Yahoo! Games - play chess, backgammon, pool and more http://games.yahoo.com/
В списке pgsql-novice по дате отправления: