Changes between Version 1 and Version 2 of Database Optimization


Ignore:
Timestamp:
May 10, 2006, 2:34:09 PM (14 years ago)
Author:
crschmidt@…
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Database Optimization

    v1 v2  
    1 09:24:58  * Dom recommends inspecting http://www.wiki-toolkit.org/browser/wiki-toolkit/trunk/lib/Wiki/Toolkit/Setup
    2 09:27:10 <@crschmidt> Dom: the problem is that the metadata table doesn't have a useful index --
    3 09:27:52 <@crschmidt> the most common use cases are "Select all metadata for a node, given an id and a version", and "Select all nodes, given a metadata_type and
    4                       metadata_value"
     109:24:58  * Dom recommends inspecting http://www.wiki-toolkit.org/browser/wiki-toolkit/trunk/lib/Wiki/Toolkit/Setup<br />
     209:27:10 <@crschmidt> Dom: the problem is that the metadata table doesn't have a useful index --<br />
     309:27:52 <@crschmidt> the most common use cases are "Select all metadata for a node, given an id and a version", and "Select all nodes, given a metadata_type and metadata_value"<br />
    5409:28:24 <@Dom> crschmidt: isn't that what, say, http://www.wiki-toolkit.org/browser/wiki-toolkit/trunk/lib/Wiki/Toolkit/Setup/MySQL.pm#L62 is doing?
    6 09:28:52 <@crschmidt> No, that creates a single index -- those can't be split up
    7 09:29:07 <@Dom> ah, right.
    8 09:29:30 <@PerfDave> Raw SQL rather than DBIx::Class? ;)
    9 09:29:51 <@crschmidt> Creating an index on node_id,version would speed up the first case (I Think) and creating an index on metadata_name, metadata_value would speed
    10                       up the second (I think)
     509:28:52 <@crschmidt> No, that creates a single index -- those can't be split up<br />
     609:29:07 <@Dom> ah, right.<br />
     709:29:51 <@crschmidt> Creating an index on node_id,version would speed up the first case (I Think) and creating an index on metadata_name, metadata_value would speed up the second (I think)
    118
    129