Skip to content

Database Fix - #2461

Merged
daN4cat merged 2 commits into
masterfrom
database-fixes-si
Jun 15, 2019
Merged

daN4cat merged 2 commits into
masterfrom
database-fixes-si

Conversation

@SteveIreland

Copy link
Copy Markdown
Collaborator

This adds a couple of missing constraints. I haven't been able to test with the most recent master yet because of the bintray issues so please don't merge it yet.

@SteveIreland

SteveIreland commented Jun 13, 2019 •

Copy link
Copy Markdown
Collaborator Author

Don't merge just yet. I'm planning on adding a couple of constraints to the tax rate table. I just wanted someone to take a look at these changes to make sure that I'm meeting expectations.

@SteveIreland
SteveIreland requested a review from jekkos June 13, 2019 02:00
@SteveIreland SteveIreland self-assigned this Jun 13, 2019
@SteveIreland SteveIreland added this to the 3.3.0 milestone Jun 13, 2019
@SteveIreland

Copy link
Copy Markdown
Collaborator Author

The last changes that I identified have been added to this pull request. If there are any other missing database constraints just let me know and I'll be happy to add them.

@daN4cat

daN4cat commented Jun 14, 2019 •

Copy link
Copy Markdown
Collaborator

I've added a comment even if not related specifically to this change, but given we are adding indexes I wonder if we should check we have everything in place. For instance trans_time is used for Items data range selection and there is no index and probably no foreign key neither.

@SteveIreland

Copy link
Copy Markdown
Collaborator Author

I've applied an index to three of the timestamps I've found. That should certainly improve the performance of any filters or queries that involve the timestamp.

@daN4cat
daN4cat merged commit e60d2ab into master Jun 15, 2019
@daN4cat
daN4cat self-requested a review June 15, 2019 09:10
@daN4cat

daN4cat commented Jun 15, 2019

Copy link
Copy Markdown
Collaborator

Thanks for the work @SteveIreland. I've added a date index to expenses table, tested and merged.

@jekkos

jekkos commented Jun 15, 2019

Copy link
Copy Markdown
Member

Not sure if adding indexes for singe fields will always help us out here. We probably need to check which queries are ran and then explain them to see which (combined) indexes we need to create.

@daN4cat
daN4cat deleted the database-fixes-si branch December 14, 2019 17:04
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.

3 participants