Re: WIP: Faster Expression Processing v4
Andres Freund <andres@anarazel.de>
From: Andres Freund <andres@anarazel.de>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Heikki Linnakangas <hlinnaka@iki.fi>, Tomas Vondra <tomas.vondra@2ndquadrant.com>, pgsql-hackers@postgresql.org
Date: 2017-03-24T00:43:23Z
Lists: pgsql-hackers
Hi,m On 2017-03-23 17:40:55 -0400, Tom Lane wrote: > Stylistic thought ... I am wondering if it wouldn't be a good idea > to replace EEOP_CASE_WHEN_STEP, EEOP_CASE_THEN_STEP, EEOP_COALESCE, > and EEOP_ARRAYREF_CHECKINPUT with instructions defined in a less > usage-dependent way as > > EEOP_JUMP unconditional jump > EEOP_JUMP_IF_NULL jump if step result is null > EEOP_JUMP_IF_NOT_NULL jump if step result isn't null > EEOP_JUMP_IF_NOT_TRUE jump if step result isn't TRUE > > One could imagine later filling out this set with the other BoolTest > condition types, but that seems to be all we need right now. Hm, no arguments against, but I'm also not particularly excited about the change. > These are basically just renamings of the step types that exist now, > although EEOP_ARRAYREF_CHECKINPUT would have to drop its not-very- > necessary Assert(!op->d.arrayref.state->isassignment). I won't shed a tear about that assert's removal. > Well, I guess I should say that they're renamings of the semantics > that I have for these steps in my working copy; for instance, I got > rid of casewhen.value/casewhen.isnull in favor of letting CASE WHEN > expressions evaluate into the CASE's final output variable. That sounds like a sensible change (in the abstract, I obviously haven't seen your working copy). Greetings, Andres Freund
Commits
-
Improve performance of ExecEvalWholeRowVar.
- 2f0903ea1965 10.0 landed
-
Remove unreachable code in expression evaluation.
- ad46a2aa79f9 10.0 landed
-
Faster expression evaluation and targetlist projection.
- b8d7f053c5c2 10.0 landed
-
Avoid syntax error on platforms that have neither LOCALE_T nor ICU.
- 457a44487328 10.0 cited
-
Add configure test to see if the C compiler has gcc-style computed gotos.
- bc18126a6bcb 10.0 landed
-
Improve regression test coverage for TID scanning.
- be6c3d19fd45 10.0 landed
-
Improve expression evaluation test coverage.
- ce38949ba23a 10.0 landed
-
Fix two errors with nested CASE/WHEN constructs.
- f0c7b789ab12 9.6.0 cited