Exponential growth of the slots table
Elwood Hunt
elwood.hunt at gmail.com
Sat Dec 4 01:10:32 EST 2010
If I run this query:
SELECT name, count(*)
FROM slots
GROUP BY name
HAVING COUNT(*) > 2;
I get approx. 300 rows back, most of them having a count of 54 (meaning I
have 300 slot names with each having 53 duplicates = 15,900 extra rows). I
have a good understanding of relational databases but I'm totally clueless
on how this slots table works. Any documentation would be appreciated.
Thanks,
Elwood
On Fri, Dec 3, 2010 at 8:48 PM, John Ralls <jralls at ceridwen.us> wrote:
>
> On Dec 3, 2010, at 7:23 PM, Elwood Hunt wrote:
>
> > Hi,
> >
> > I am using version 2.3.16 with MySQL as the database. For backups, I
> will
> > often use MySQL Administrator to export the entire schema to an SQL DDL
> > file. I recently noticed that the size of my backup file grew from ~
> 800K
> > to ~ 2.8MB after adding a budget for one month (I have maybe 25 expense
> > accounts). I also noticed that it was the slots table that grew so much
> > (several thousand additional rows). Is this normal or did something go
> > wrong?
> >
>
> Maybe both.
>
> Nested slots weren't supported until 2.3.16 -- and it's something depended
> upon by several features, including budgeting and account mapping for
> imported transactions. The slots architecture doesn't map very well into the
> relational model, so it's not very efficient in terms of either space or
> performance. (More like it's very inefficient.)
>
> It's also possible that slots are being duplicated when they're written
> out. If you're able, find a slot name and then query in the mysql shell to
> see if there are duplicates.
>
> Regards,
> John Ralls
>
>
More information about the gnucash-user
mailing list