Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Schema fixes #31

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open

Schema fixes #31

wants to merge 7 commits into from

Conversation

ilmari
Copy link

@ilmari ilmari commented Apr 28, 2024

No description provided.

ilmari added 7 commits April 27, 2024 23:04
Postgres can efficiently use any prefix of an index.
And reorder one UNIQUE key to have the foreign key column first
It's only queries together, so having it in the same index is more
efficient than BitmapAnd-ing two indexes.

my $schema = $self->result_source->schema;
$schema->resultset('Coverage')->search(
$self->coverages->search(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I do not understand how this change works, can you explain it?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The has_many declaration in Schema::Run creates an accessor that's equivalent to ->related_resultset($name).

@exodist
Copy link
Member

exodist commented Apr 28, 2024

FYI I have "merged" this with some creative rebasing in this repo/tree here: https://github.com/Test-More/Test2-Harness/tree/2.0_merge_t2h I inserted them after merging the Test2::Harness::UI history into Test2::Harness, but before all the big changes I have made to where files are located. To my amazement there were no conflicts and the rebase was clean.

I am leaving this PR open due to my request to understand one specific change (see inline comment). But once Test2::Harness 2.0 is shipped it will contain these improvements.

Thank you, I greatly appreciate your help and contribution on this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants