Repository navigation
Page + count in one statement, cached insert plans, fast UTC hydration - #2
Merged
Merged
Conversation
…e datetime hydration - Select::fetchPage(limit, offset): the page and the COUNT of the whole query in one statement (the count is a scalar subquery column of the page query), through the cached shape plan; past the last row or for customized selects it falls back to count() plus fetchAll(). Shape plans map a value to every parameter it lands in. - SelectQuery::countQuery() is the query count() runs. - CompilerCache hashed a SelectQuery column through __toString(): its values were interpolated into the cache key and its parameters were never bound. - StatementPlans accept DateTimeInterface values (the driver formats them when binding), so inserts and updates with timestamps reuse the cached statement. - Driver::getTimezone() keeps one DateTimeZone per configured name. - DirectInsert keeps role descriptions per ORM instead of per unit of work. - Compiled row makers construct datetime fields inline in the driver timezone.
…he runtime has it On the PAM runtime a UTC datetime column is a filled-in clone of a prototype instead of a parse: the same DateTimeImmutable the constructor returns, about 4x cheaper. Values the function does not take (other shapes, zones or non-strings) still go to the constructor.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Select::fetchPage (COUNT real como subquery), fix de parâmetros em subquery como coluna, plano de insert com datetime em cache, hidratação UTC via pam_native_utc_datetime quando disponível. Testes de fetchPage e subquery-coluna.