Hi Victor,
Il giorno mer, 14/07/2010 alle 10.27 +0200, Victor Engmark ha scritto:
> Hi all,
>
> Is anyone using native MySQL foreign keys / unique constraints / indexes
> at all in Invenio? For example, the only place I could find creation of
> an index is in modules/bibrank/lib/bibrank_citation_indexer.py, and
> that's just for a temporary table. Are constraints maintained in Python?
> Has anyone benchmarked those compared to MySQL constraints? And how do
> you survive performance-wise without indexes?
in Invenio we currently use MyISAM tables (instead of InnoDB), and for
this reasons we don't implement in MySQL foreign keys and referential
integrity constraints (which are instead enforced by the Python business
logic). MyISAM table a
However we do indeed use plenty of indexes, primary keys and unique
constraints.
Just have a look at:
modules/miscutil/sql/tabcreate.sql
What you found in bibrank_citation_indexer.py is just one of the few
places where DB tables are created at runtime (and not at installation
time). Others are bibindex_engine.py (and bibindexadminlib.py) and
webstat.py. All of these places uses INDEXes.
For benchmarks between Python constraints vs MySQL constraints (and
MyISAM Vs. InnoDB) maybe Tibor will want to say more (once he'll be back
from holidays :-) ).
Cheers!
Sam
--
Samuele Kaplun
Invenio Developer ** <http://invenio-software.org/>