Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- SELECT
- *
- FROM
- product p INNER JOIN productStore ps ON p.productUUID = ps.productUUID
- ORDER BY
- ps.storeTitle
- LIMIT 50;
- id select_type table type possible_keys key key_len ref rows Extra
- 1 SIMPLE ps ALL PRIMARY NULL NULL NULL 942187 Using filesort
- 1 SIMPLE p eq_ref PRIMARY PRIMARY 16 foeniks_core.ps.productUUID 1 NULL
- id select_type table type possible_keys key key_len ref rows Extra
- 1 SIMPLE ps ALL PRIMARY NULL NULL NULL 942187 NULL
- 1 SIMPLE p eq_ref PRIMARY PRIMARY 16 foeniks_core.ps.productUUID 1 NULL
- CREATE TABLE `productStore` (
- `productUUID` binary(16) NOT NULL,
- `storeUUID` binary(16) NOT NULL,
- `distributorLastUsed` binary(16) DEFAULT NULL,
- `storeTitle` varchar(282) DEFAULT NULL,
- `storeUrl` varchar(282) DEFAULT NULL,
- `storeDescription` text,
- `storeDescriptionDemo` text,
- `storePrice` int(11) NOT NULL DEFAULT '0',
- `storePriceNext` int(11) NOT NULL DEFAULT '0',
- `storePriceCost` int(11) NOT NULL DEFAULT '0',
- `overwrites` int(11) NOT NULL DEFAULT '0',
- `updated` datetime NOT NULL DEFAULT '1000-01-01 00:00:00',
- `added` datetime NOT NULL DEFAULT '1000-01-01 00:00:00',
- `allowDisplay` tinyint(1) NOT NULL DEFAULT '0',
- `activated` tinyint(1) NOT NULL DEFAULT '1',
- PRIMARY KEY (`productUUID`,`storeUUID`),
- KEY `productStoreLanguageToStore_idx` (`storeUUID`),
- KEY `productStoreToDistributor_idx` (`distributorLastUsed`),
- KEY `storeUrl` (`storeUrl`(180)) USING BTREE,
- KEY `testStoreTitle` (`storeTitle`(182)),
- CONSTRAINT `productStoreToDistributor` FOREIGN KEY (`distributorLastUsed`) REFERENCES `distributor` (`distributorUUID`) ON DELETE SET NULL ON UPDATE CASCADE,
- CONSTRAINT `productStoreToProduct` FOREIGN KEY (`productUUID`) REFERENCES `product` (`productUUID`) ON DELETE CASCADE ON UPDATE CASCADE,
- CONSTRAINT `productStoreToStore` FOREIGN KEY (`storeUUID`) REFERENCES `store` (`storeUUID`) ON DELETE CASCADE ON UPDATE CASCADE
- ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement