[Kmymoney-devel] Anyone good with SQL?

Tony Bloomfield tonyb.lx at ntlworld.com
Fri Aug 12 10:30:37 UTC 2011


On Thu, 11 Aug 2011 20:15:43 +0000 (GMT)
Colin Wright <cdwright at gwi.net> wrote:

> It looks like it could be really slow in a large data set.  If this
> is done a lot you'd want an index on kmmSplits(accountid, postDate)
> (or kmmSplits(accountid, txType, postDate) if it does lots of
> type-based searches and N is uncommon).

Unfortunately, 'N' is the most common. The alternative is 'S' which is
used only with template schedule transactions, not 'real' ones.

There is already an index on AccountId + txType; you can use
'Tools/Generate database SQL' in KMM to see the schema.

Please remember if you create indexes or views of your own not to name
them beginning with the three characters 'kmm' which are reserved for
'official' tables, etc.


-- 
Cheers,
Tonyb


More information about the KMyMoney-devel mailing list