in reply to Re: Querying Meta Data
in thread Querying Meta Data
SELECT n.* FROM nodes n, meta_data md1, meta_data md2 WHERE md1.name = ? AND md1.value = ? AND n.id = md1.node_id AND md2.name = ? AND md2.value = ? AND n.id = md2.node_id ORDER BY 1
(Check the documentation for your database software to confirm that this is supported and identify any idiosyncratic syntax that you may have to comply with.)
For what it's worth, I use a similar structure to store clinical records data for a hospital's psychiatry department, and after a bit of time spent examining MySQL's query plans and adjusting the indexes, have found the performance of this type of query to be acceptable, even with tens of thousands of entries.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: Querying Meta Data
by eric256 (Parson) on Jul 24, 2003 at 20:07 UTC | |
by simonm (Vicar) on Jul 24, 2003 at 23:39 UTC | |
by eric256 (Parson) on Jul 24, 2003 at 23:53 UTC |