[wp-hackers] Meta tables: Take 5
Otto
otto at ottodestruct.com
Fri Aug 7 13:22:50 UTC 2009
On Thu, Aug 6, 2009 at 10:41 PM, Mike
Schinkel<mikeschinkel at newclarity.net> wrote:
> Everything I know
> about indexes (though am willing to learn otherwise) tells me that that
> you'll need to store 1 million values for meta_type+object_id...
Why would you make the index meta_type + object_id? I was talking
about just an index on the type. I'd want an entirely separate index
on the object_id, since you're going to probably pull records by
object_id a lot.
> How you can have a b-tree with only 3 levels deep with a 1 million records?
> 10 million records? 100 million records? I don't see how it is possible
> (I hope I'm wrong, so please educate me.)
The number of records is irrelevant to the index depth (its size grows
as a function of number of records). The depth of the b-tree is
determined solely by the number of unique values that you're indexing on.
-Otto
Sent from Memphis, TN, United States
More information about the wp-hackers
mailing list