[ZODB-Dev] RelStorage - what tables and indexes should be present?

Chris Withers chris at simplistix.co.uk
Tue Feb 1 09:43:54 EST 2011


On 01/02/2011 14:42, Stephan Richter wrote:
> On Tuesday, February 01, 2011, Chris Withers wrote:
>> I also note that while the ones with lots of tables have this schema for
>> object_state:
>>
>> CREATE TABLE `object_state` (
>>     `zoid` bigint(20) NOT NULL,
>>     `tid` bigint(20) NOT NULL,
>>     `state` longblob,
>>     PRIMARY KEY (`zoid`)
>> ) ENGINE=InnoDB DEFAULT CHARSET=latin1$$
>>
>> ...the one with only two tables has this schema:
>>
>> CREATE TABLE `object_state` (
>>     `zoid` bigint(20) NOT NULL,
>>     `tid` bigint(20) NOT NULL,
>>     `state` longblob,
>>     PRIMARY KEY (`zoid`)
>> ) ENGINE=InnoDB DEFAULT CHARSET=latin1$$
>
> Did you paste correctly? They seem identical to me.

Nope, I phail... but the above is the incorrect version.
Try creating a RelStorage and you'll see.

The above ends up being really slow as it has no index on tid...

cheers,

Chris

-- 
Simplistix - Content Management, Batch Processing & Python Consulting
            - http://www.simplistix.co.uk


More information about the ZODB-Dev mailing list