MySQL Forums
Forum List  »  InnoDB

Re: A very slow query on InnoDb 5.1.67
Posted by: Willem van Schevikhoven
Date: April 26, 2013 07:06AM

Hi Rick!

You are right that removing LEFT from joins does speed up the query, or in other words gives less results, but they are there for a reson.

The query ideally gives a result of orders, and their shipment and invoiced amounts, but not all orders have an invoice or a shipment yet, thus we need a left join so that an order, even if it doesnt have invoices or shipments, is shown.

Left joins on customers & shipments is because sometimes an order is accidentally saved without a customer, or a shipment. Yes, application level should make sure that wouldnt happen, but on the other hand the overhead in the query (if iam correct at least) is minimal as there is really only one row added.

Is JOIN faster than LEFT JOIN, or is this because LEFT JOIN will usually result in more rows in the resulting set of data?


All ID's are primary keys, and those are the ones used in these joins too.


I think that the monster in this query is the INVOICES -subquery. The idea for it is to map payments (per invoice, not per row) to invoice rows and then further to order rows. Provided that a payment can only be for one invoice, but can only be partial, an invoice can have multiple payments, and thus an invoice row can be 50 % paid. An invoice can have rows from several orders (think wholesale customers), and that is why the amount paid needs to be divided to every invoice row and futher the order rows instead of an invoice-per-order approach which would simplify the query a bit. An order row can also be invoiced partially (think of adding a second item), so an order row can have several invoice rows pointing to it, but an invoice row can only point to one order row.


SHOW CREATE TABLEs for tables in this order. After each other for easy copypasting if needed:
rmm_sales_invoice
rmm_sales_invoice_row
rmm_sales_order
rmm_sales_order_row
rmm_sales_shipment
rmm_sales_shipment_row
rmm_sales_remittance
rmm_customers
rmm_modules_payment
rmm_modules_shipment


CREATE TABLE `rmm_sales_invoice` (
  `sales_invoice_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `customer_id` int(10) unsigned DEFAULT NULL,
  `sales_invoice_date` date NOT NULL,
  `sales_invoice_duedate` date DEFAULT NULL,
  `sales_invoice_complaint_time` int(11) NOT NULL DEFAULT '7',
  `sales_invoice_reference` varchar(45) COLLATE utf8_unicode_ci DEFAULT NULL,
  `sales_invoice_client_reference` varchar(45) COLLATE utf8_unicode_ci DEFAULT NULL,
  `sales_invoice_dispatch_note` text COLLATE utf8_unicode_ci,
  `sales_invoice_type` varchar(45) COLLATE utf8_unicode_ci DEFAULT 'sale',
  `sales_invoice_status` varchar(45) COLLATE utf8_unicode_ci NOT NULL DEFAULT 'new inactive',
  `site_name` varchar(32) COLLATE utf8_unicode_ci DEFAULT NULL,
  PRIMARY KEY (`sales_invoice_id`),
  UNIQUE KEY `i_reference_unique` (`sales_invoice_reference`),
  KEY `fk_rmm_sales_invoice_rmm_customers1` (`customer_id`),
  CONSTRAINT `fk_rmm_sales_invoice_rmm_customers1` FOREIGN KEY (`customer_id`) REFERENCES `rmm_customers` (`cu                                               stomer_id`) ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=3139 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;




CREATE TABLE `rmm_sales_invoice_row` (
  `sales_invoice_row_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `sales_invoice_id` int(10) unsigned NOT NULL,
  `sales_invoice_row_quantity` float(10,2) NOT NULL DEFAULT '1.00',
  `sales_invoice_row_unit_price` float(10,2) NOT NULL DEFAULT '0.00',
  `sales_invoice_row_total` float(10,2) NOT NULL DEFAULT '0.00',
  `sales_invoice_row_vat_percentage` float(10,2) NOT NULL DEFAULT '22.00',
  `sales_invoice_row_title` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '-',
  `sales_invoice_row_pcode` varchar(255) COLLATE utf8_unicode_ci DEFAULT 'NONINV',
  `sales_invoice_row_sales_unit` varchar(45) COLLATE utf8_unicode_ci DEFAULT 'pcs',
  `sales_invoice_row_time` datetime DEFAULT NULL,
  `sales_order_row_id` int(11) DEFAULT NULL,
  PRIMARY KEY (`sales_invoice_row_id`),
  KEY `fk_rmm_sales_invoice_row_rmm_sales_invoice1` (`sales_invoice_id`),
  KEY `fk_rmm_sales_invoice_row_rmm_sales_order_row1` (`sales_order_row_id`),
  CONSTRAINT `fk_rmm_sales_invoice_row_rmm_sales_invoice1` FOREIGN KEY (`sales_invoice_id`) REFERENCES `rmm_sales_invoice` (`sales_invoice_id`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `rmm_sales_invoice_row_ibfk_1` FOREIGN KEY (`sales_order_row_id`) REFERENCES `rmm_sales_order_row` (`sales_order_row_id`) ON DELETE SET NULL ON UPDATE CASCADE,
  CONSTRAINT `rmm_sales_invoice_row_ibfk_2` FOREIGN KEY (`sales_order_row_id`) REFERENCES `rmm_sales_order_row` (`sales_order_row_id`) ON DELETE SET NULL ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=7650 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;




CREATE TABLE `rmm_sales_order` (
  `sales_order_id` int(11) NOT NULL AUTO_INCREMENT,
  `sales_order_date` datetime NOT NULL,
  `sales_order_notes_public` text COLLATE utf8_unicode_ci,
  `sales_order_notes_internal` text COLLATE utf8_unicode_ci,
  `sales_order_status` varchar(45) COLLATE utf8_unicode_ci NOT NULL,
  `billing_customer_id` int(10) unsigned DEFAULT NULL,
  `delivery_customer_id` int(10) unsigned DEFAULT NULL,
  `viewkey_id` int(10) unsigned DEFAULT NULL,
  `sales_staff_id` smallint(5) unsigned NOT NULL,
  `method_shipment_id` int(10) unsigned DEFAULT NULL,
  `method_payment_id` int(10) unsigned DEFAULT NULL,
  `is_standalone` tinyint(1) NOT NULL DEFAULT '0',
  `site_name` varchar(32) COLLATE utf8_unicode_ci DEFAULT NULL,
  PRIMARY KEY (`sales_order_id`),
  KEY `i_sales_order_state` (`sales_order_status`),
  KEY `fk_rmm_sales_order_billing_customer_id` (`billing_customer_id`),
  KEY `fk_rmm_sales_order_delivery_customer_id` (`delivery_customer_id`),
  KEY `fk_rmm_sales_order_rmm_viewkeys` (`viewkey_id`),
  KEY `fk_rmm_sales_order_rmm_staff1` (`sales_staff_id`),
  KEY `method_shipment_id` (`method_shipment_id`),
  KEY `method_payment_id` (`method_payment_id`),
  CONSTRAINT `fk_rmm_sales_order_billing_customer_id` FOREIGN KEY (`billing_customer_id`) REFERENCES `rmm_customers` (`customer_id`) ON UPDATE CASCADE,
  CONSTRAINT `fk_rmm_sales_order_delivery_customer_id` FOREIGN KEY (`delivery_customer_id`) REFERENCES `rmm_customers` (`customer_id`) ON UPDATE CASCADE,
  CONSTRAINT `fk_rmm_sales_order_rmm_staff1` FOREIGN KEY (`sales_staff_id`) REFERENCES `rmm_staff` (`staff_id`) ON UPDATE CASCADE,
  CONSTRAINT `fk_rmm_sales_order_rmm_viewkeys` FOREIGN KEY (`viewkey_id`) REFERENCES `rmm_viewkeys` (`viewkey_id`) ON UPDATE CASCADE,
  CONSTRAINT `rmm_sales_order_ibfk_1` FOREIGN KEY (`method_shipment_id`) REFERENCES `rmm_modules_shipment` (`method_id`),
  CONSTRAINT `rmm_sales_order_ibfk_2` FOREIGN KEY (`method_payment_id`) REFERENCES `rmm_modules_payment` (`method_id`)
) ENGINE=InnoDB AUTO_INCREMENT=5648 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;




CREATE TABLE `rmm_sales_order_row` (
  `sales_order_row_id` int(11) NOT NULL AUTO_INCREMENT,
  `sales_order_id` int(11) NOT NULL,
  `sales_order_row_quantity` float(10,2) NOT NULL DEFAULT '0.00',
  `sales_order_row_unit_price` float(10,2) NOT NULL DEFAULT '0.00',
  `sales_order_row_total` float(10,2) NOT NULL,
  `sales_order_row_vat_percentage` float(10,2) NOT NULL DEFAULT '0.00',
  `sales_order_row_title` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `sales_order_row_pcode` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `sales_order_row_sales_unit` varchar(45) COLLATE utf8_unicode_ci DEFAULT NULL,
  `sales_order_row_time` datetime DEFAULT NULL,
  `article_id` mediumint(8) unsigned DEFAULT NULL,
  `item_id` mediumint(8) unsigned DEFAULT NULL,
  `brand_id` smallint(5) unsigned DEFAULT NULL,
  `is_cancelled` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`sales_order_row_id`),
  KEY `fk_rmm_sales_order_row_rmm_sales_order` (`sales_order_id`),
  KEY `fk_rmm_sales_order_row_rmm_articles` (`article_id`),
  KEY `fk_rmm_sales_order_row_rmm_items` (`item_id`),
  KEY `fk_rmm_sales_order_row_rmm_brands` (`brand_id`),
  CONSTRAINT `fk_rmm_sales_order_row_rmm_articles` FOREIGN KEY (`article_id`) REFERENCES `rmm_articles` (`article_id`) ON DELETE SET NULL ON UPDATE CASCADE,
  CONSTRAINT `fk_rmm_sales_order_row_rmm_brands` FOREIGN KEY (`brand_id`) REFERENCES `rmm_brands` (`brand_id`) ON UPDATE CASCADE,
  CONSTRAINT `fk_rmm_sales_order_row_rmm_items` FOREIGN KEY (`item_id`) REFERENCES `rmm_items` (`item_id`) ON DELETE SET NULL ON UPDATE CASCADE,
  CONSTRAINT `fk_rmm_sales_order_row_rmm_sales_order` FOREIGN KEY (`sales_order_id`) REFERENCES `rmm_sales_order` (`sales_order_id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=20485 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;




CREATE TABLE `rmm_sales_shipment` (
  `sales_shipment_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `customer_id` int(10) unsigned DEFAULT NULL,
  `sales_shipment_time` datetime NOT NULL,
  `staff_id` smallint(5) unsigned NOT NULL,
  `sales_shipment_tracking` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `cod_invoice_id` int(10) unsigned DEFAULT NULL,
  `sales_shipment_status` varchar(64) COLLATE utf8_unicode_ci NOT NULL DEFAULT 'incomplete',
  `sales_shipment_type` varchar(64) COLLATE utf8_unicode_ci NOT NULL DEFAULT 'outgoing',
  `method_shipment_id` int(10) unsigned DEFAULT NULL,
  `method_payment_id` int(10) unsigned DEFAULT NULL,
  `sales_shipment_notes_public` text COLLATE utf8_unicode_ci,
  `site_name` varchar(32) COLLATE utf8_unicode_ci DEFAULT NULL,
  PRIMARY KEY (`sales_shipment_id`),
  KEY `fk_rmm_sales_shipment_rmm_customers1` (`customer_id`),
  KEY `fk_rmm_sales_shipment_rmm_staff1` (`staff_id`),
  KEY `fk_rmm_sales_shipment_rmm_sales_invoice1` (`cod_invoice_id`),
  KEY `method_payment_id` (`method_payment_id`),
  KEY `method_shipment_id` (`method_shipment_id`),
  CONSTRAINT `fk_rmm_sales_shipment_rmm_customers1` FOREIGN KEY (`customer_id`) REFERENCES `rmm_customers` (`customer_id`) ON UPDATE CASCADE,
  CONSTRAINT `fk_rmm_sales_shipment_rmm_sales_invoice1` FOREIGN KEY (`cod_invoice_id`) REFERENCES `rmm_sales_invoice` (`sales_invoice_id`) ON UPDATE CASCADE,
  CONSTRAINT `fk_rmm_sales_shipment_rmm_staff1` FOREIGN KEY (`staff_id`) REFERENCES `rmm_staff` (`staff_id`) ON UPDATE CASCADE,
  CONSTRAINT `rmm_sales_shipment_ibfk_1` FOREIGN KEY (`method_shipment_id`) REFERENCES `rmm_modules_shipment` (`method_id`),
  CONSTRAINT `rmm_sales_shipment_ibfk_2` FOREIGN KEY (`method_payment_id`) REFERENCES `rmm_modules_payment` (`method_id`),
  CONSTRAINT `rmm_sales_shipment_ibfk_3` FOREIGN KEY (`method_shipment_id`) REFERENCES `rmm_modules_shipment` (`method_id`),
  CONSTRAINT `rmm_sales_shipment_ibfk_4` FOREIGN KEY (`method_payment_id`) REFERENCES `rmm_modules_payment` (`method_id`)
) ENGINE=InnoDB AUTO_INCREMENT=2970 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;




CREATE TABLE `rmm_sales_shipment_row` (
  `sales_shipment_row_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `sales_shipment_id` int(10) unsigned NOT NULL,
  `sales_shipment_row_qty` float(10,2) unsigned NOT NULL,
  `sales_shipment_row_title` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `brand_id` smallint(5) unsigned DEFAULT NULL,
  `sales_shipment_row_pcode` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `sales_order_row_id` int(11) DEFAULT NULL,
  PRIMARY KEY (`sales_shipment_row_id`),
  KEY `fk_rmm_sales_shipment_row_rmm_sales_order_row1` (`sales_order_row_id`),
  KEY `fk_rmm_sales_shipment_row_rmm_sales_shipment1` (`sales_shipment_id`),
  KEY `brand_id` (`brand_id`),
  CONSTRAINT `fk_rmm_sales_shipment_row_rmm_sales_order_row1` FOREIGN KEY (`sales_order_row_id`) REFERENCES `rmm_sales_order_row` (`sales_order_row_id`) ON UPDATE CASCADE,
  CONSTRAINT `fk_rmm_sales_shipment_row_rmm_sales_shipment1` FOREIGN KEY (`sales_shipment_id`) REFERENCES `rmm_sales_shipment` (`sales_shipment_id`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `rmm_sales_shipment_row_ibfk_1` FOREIGN KEY (`brand_id`) REFERENCES `rmm_brands` (`brand_id`) ON UPDATE CASCADE,
  CONSTRAINT `rmm_sales_shipment_row_ibfk_2` FOREIGN KEY (`brand_id`) REFERENCES `rmm_brands` (`brand_id`) ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=10370 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;




CREATE TABLE `rmm_sales_remittance` (
  `remittance_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `transaction_id` int(10) unsigned DEFAULT NULL,
  `sales_invoice_id` int(10) unsigned NOT NULL,
  `credit_invoice_id` int(10) unsigned DEFAULT NULL,
  `amount` float NOT NULL,
  `type` varchar(64) COLLATE utf8_unicode_ci NOT NULL,
  `date` date NOT NULL,
  PRIMARY KEY (`remittance_id`),
  KEY `transaction_id` (`transaction_id`),
  KEY `sales_invoice_id` (`sales_invoice_id`),
  KEY `credit_invoice_id` (`credit_invoice_id`),
  CONSTRAINT `rmm_sales_remittance_ibfk_1` FOREIGN KEY (`transaction_id`) REFERENCES `rmm_account_transaction` (`transaction_id`) ON UPDATE CASCADE,
  CONSTRAINT `rmm_sales_remittance_ibfk_2` FOREIGN KEY (`sales_invoice_id`) REFERENCES `rmm_sales_invoice` (`sales_invoice_id`) ON UPDATE CASCADE,
  CONSTRAINT `rmm_sales_remittance_ibfk_3` FOREIGN KEY (`credit_invoice_id`) REFERENCES `rmm_sales_invoice` (`sales_invoice_id`) ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=2925 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;




CREATE TABLE `rmm_customers` (
  `customer_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `customer_firstname` varchar(128) COLLATE utf8_unicode_ci NOT NULL,
  `customer_lastname` varchar(128) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `customer_company` varchar(128) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `customer_street` varchar(128) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `customer_city` varchar(128) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `customer_zip` varchar(45) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `customer_state` varchar(128) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `customer_email` varchar(128) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `customer_tel1` varchar(45) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `customer_fax` varchar(45) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `customer_company_id` varchar(25) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `customer_country` varchar(45) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `customer_ssid` varchar(45) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  PRIMARY KEY (`customer_id`),
  UNIQUE KEY `i_customer_unique` (`customer_firstname`,`customer_lastname`,`customer_street`,`customer_city`,`customer_zip`,`customer_state`,`customer_country`,`customer_company`)
) ENGINE=InnoDB AUTO_INCREMENT=3600 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;




CREATE TABLE `rmm_modules_payment` (
  `method_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `method_title_content_id` mediumint(8) unsigned DEFAULT NULL,
  `module_class` varchar(128) COLLATE utf8_unicode_ci NOT NULL,
  `module_entry_file` varchar(128) COLLATE utf8_unicode_ci NOT NULL,
  `method_name` varchar(128) COLLATE utf8_unicode_ci NOT NULL,
  `method_availability` tinyint(3) unsigned NOT NULL DEFAULT '0',
  `method_type` varchar(64) COLLATE utf8_unicode_ci NOT NULL DEFAULT 'prepay',
  PRIMARY KEY (`method_id`),
  UNIQUE KEY `i_unique_payment_methods` (`module_class`,`method_name`),
  KEY `fk_rmm_modules_payment_rmm_content1` (`method_title_content_id`),
  CONSTRAINT `fk_rmm_modules_payment_rmm_content1` FOREIGN KEY (`method_title_content_id`) REFERENCES `rmm_content` (`content_id`) ON DELETE SET NULL ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;




CREATE TABLE `rmm_modules_shipment` (
  `method_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `method_title_content_id` mediumint(8) unsigned DEFAULT NULL,
  `module_class` varchar(128) COLLATE utf8_unicode_ci NOT NULL,
  `module_entry_file` varchar(128) COLLATE utf8_unicode_ci NOT NULL,
  `method_name` varchar(128) COLLATE utf8_unicode_ci NOT NULL,
  `method_availability` tinyint(3) unsigned NOT NULL DEFAULT '0',
  PRIMARY KEY (`method_id`),
  UNIQUE KEY `i_unique_shipment_methods` (`module_class`,`method_name`),
  KEY `fk_rmm_modules_shipment_rmm_content1` (`method_title_content_id`),
  CONSTRAINT `fk_rmm_modules_shipment_rmm_content1` FOREIGN KEY (`method_title_content_id`) REFERENCES `rmm_content` (`content_id`) ON DELETE SET NULL ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;






********************EXPLAIN EXTENDED SELECT...*********************

EXPLAIN EXTENDED:
+----+--------------+------------------------+--------+------------------------------------------------+------------------------------------------------+---------+-------------------------------------------------+-------+----------+----+
| id | select_type  | table                  | type   | possible_keys                                  | key                                            | key_len | ref                                             | rows  | filtered | Ext|
+----+--------------+------------------------+--------+------------------------------------------------+------------------------------------------------+---------+-------------------------------------------------+-------+----------+----+
|  1 | PRIMARY      | <derived2>             | ALL    | NULL                                           | NULL                                           | NULL    | NULL                                            | 19107 |   100.00 | Usi|
|  2 | DERIVED      | rmm_sales_order        | ALL    | PRIMARY                                        | NULL                                           | NULL    | NULL                                            |  5124 |   100.00 | Usi|
|  2 | DERIVED      | rmm_customers          | eq_ref | PRIMARY                                        | PRIMARY                                        | 4       | racefi.rmm_sales_order.billing_customer_id      |     1 |   100.00 |    |
|  2 | DERIVED      | rmm_modules_payment    | eq_ref | PRIMARY                                        | PRIMARY                                        | 4       | racefi.rmm_sales_order.method_payment_id        |     1 |   100.00 |    |
|  2 | DERIVED      | rmm_modules_shipment   | eq_ref | PRIMARY                                        | PRIMARY                                        | 4       | racefi.rmm_sales_order.method_shipment_id       |     1 |   100.00 |    |
|  2 | DERIVED      | rmm_sales_order_row    | ref    | fk_rmm_sales_order_row_rmm_sales_order         | fk_rmm_sales_order_row_rmm_sales_order         | 4       | racefi.rmm_sales_order.sales_order_id           |     1 |   100.00 |    |
|  2 | DERIVED      | rmm_sales_shipment_row | ref    | fk_rmm_sales_shipment_row_rmm_sales_order_row1 | fk_rmm_sales_shipment_row_rmm_sales_order_row1 | 5       | racefi.rmm_sales_order_row.sales_order_row_id   |     1 |   100.00 |    |
|  2 | DERIVED      | rmm_sales_shipment     | eq_ref | PRIMARY                                        | PRIMARY                                        | 4       | racefi.rmm_sales_shipment_row.sales_shipment_id |     1 |   100.00 |    |
|  2 | DERIVED      | <derived3>             | ALL    | NULL                                           | NULL                                           | NULL    | NULL                                            |  6874 |   100.00 |    |
|  3 | DERIVED      | <derived4>             | ALL    | NULL                                           | NULL                                           | NULL    | NULL                                            |  7439 |   100.00 | Usi|
|  4 | DERIVED      | <derived5>             | ALL    | NULL                                           | NULL                                           | NULL    | NULL                                            |  3089 |   100.00 |    |
|  4 | DERIVED      | rmm_sales_invoice_row  | ref    | fk_rmm_sales_invoice_row_rmm_sales_invoice1    | fk_rmm_sales_invoice_row_rmm_sales_invoice1    | 4       | INVOICES_PAID.sales_invoice_id                  |     1 |   100.00 |    |
|  5 | DERIVED      | <derived6>             | ALL    | NULL                                           | NULL                                           | NULL    | NULL                                            |  6122 |   100.00 | Usi|
|  6 | DERIVED      | rmm_sales_invoice      | index  | NULL                                           | PRIMARY                                        | 4       | NULL                                            |  3175 |   100.00 | Usi|
|  6 | DERIVED      | rmm_sales_remittance   | ref    | sales_invoice_id                               | sales_invoice_id                               | 4       | racefi.rmm_sales_invoice.sales_invoice_id       |     1 |   100.00 |    |
|  6 | DERIVED      | rmm_sales_invoice_row  | ref    | fk_rmm_sales_invoice_row_rmm_sales_invoice1    | fk_rmm_sales_invoice_row_rmm_sales_invoice1    | 4       | racefi.rmm_sales_invoice.sales_invoice_id       |     1 |   100.00 |    |
|  7 | UNION        | rmm_sales_invoice      | index  | NULL                                           | PRIMARY                                        | 4       | NULL                                            |     6 | 52916.67 | Usi|
|  7 | UNION        | rmm_sales_remittance   | ref    | credit_invoice_id                              | credit_invoice_id                              | 5       | racefi.rmm_sales_invoice.sales_invoice_id       |   457 |   100.00 |    |
|  7 | UNION        | rmm_sales_invoice_row  | ref    | fk_rmm_sales_invoice_row_rmm_sales_invoice1    | fk_rmm_sales_invoice_row_rmm_sales_invoice1    | 4       | racefi.rmm_sales_invoice.sales_invoice_id       |     1 |   100.00 |    |
| NULL | UNION RESULT | <union6,7>             | ALL    | NULL                                           | NULL                                           | NULL    | NULL                                            |  NULL |     NULL |  |
+----+--------------+------------------------+--------+------------------------------------------------+------------------------------------------------+---------+-------------------------------------------------+-------+----------+----+
20 rows in set, 1 warning (11.88 sec)




EXPLAIN:
+----+--------------+------------------------+--------+------------------------------------------------+------------------------------------------------+---------+-------------------------------------------------+-------+---------------+
| id | select_type  | table                  | type   | possible_keys                                  | key                                            | key_len | ref                                             | rows  | Extra         |
+----+--------------+------------------------+--------+------------------------------------------------+------------------------------------------------+---------+-------------------------------------------------+-------+---------------+
|  1 | PRIMARY      | <derived2>             | ALL    | NULL                                           | NULL                                           | NULL    | NULL                                            | 19107 | Using temporar|
|  2 | DERIVED      | rmm_sales_order        | ALL    | PRIMARY                                        | NULL                                           | NULL    | NULL                                            |  5124 | Using temporar|
|  2 | DERIVED      | rmm_customers          | eq_ref | PRIMARY                                        | PRIMARY                                        | 4       | racefi.rmm_sales_order.billing_customer_id      |     1 |               |
|  2 | DERIVED      | rmm_modules_payment    | eq_ref | PRIMARY                                        | PRIMARY                                        | 4       | racefi.rmm_sales_order.method_payment_id        |     1 |               |
|  2 | DERIVED      | rmm_modules_shipment   | eq_ref | PRIMARY                                        | PRIMARY                                        | 4       | racefi.rmm_sales_order.method_shipment_id       |     1 |               |
|  2 | DERIVED      | rmm_sales_order_row    | ref    | fk_rmm_sales_order_row_rmm_sales_order         | fk_rmm_sales_order_row_rmm_sales_order         | 4       | racefi.rmm_sales_order.sales_order_id           |     1 |               |
|  2 | DERIVED      | rmm_sales_shipment_row | ref    | fk_rmm_sales_shipment_row_rmm_sales_order_row1 | fk_rmm_sales_shipment_row_rmm_sales_order_row1 | 5       | racefi.rmm_sales_order_row.sales_order_row_id   |     1 |               |
|  2 | DERIVED      | rmm_sales_shipment     | eq_ref | PRIMARY                                        | PRIMARY                                        | 4       | racefi.rmm_sales_shipment_row.sales_shipment_id |     1 |               |
|  2 | DERIVED      | <derived3>             | ALL    | NULL                                           | NULL                                           | NULL    | NULL                                            |  6874 |               |
|  3 | DERIVED      | <derived4>             | ALL    | NULL                                           | NULL                                           | NULL    | NULL                                            |  7439 | Using temporar|
|  4 | DERIVED      | <derived5>             | ALL    | NULL                                           | NULL                                           | NULL    | NULL                                            |  3089 |               |
|  4 | DERIVED      | rmm_sales_invoice_row  | ref    | fk_rmm_sales_invoice_row_rmm_sales_invoice1    | fk_rmm_sales_invoice_row_rmm_sales_invoice1    | 4       | INVOICES_PAID.sales_invoice_id                  |     1 |               |
|  5 | DERIVED      | <derived6>             | ALL    | NULL                                           | NULL                                           | NULL    | NULL                                            |  6122 | Using temporar|
|  6 | DERIVED      | rmm_sales_invoice      | index  | NULL                                           | PRIMARY                                        | 4       | NULL                                            |  3175 | Using index   |
|  6 | DERIVED      | rmm_sales_remittance   | ref    | sales_invoice_id                               | sales_invoice_id                               | 4       | racefi.rmm_sales_invoice.sales_invoice_id       |     1 |               |
|  6 | DERIVED      | rmm_sales_invoice_row  | ref    | fk_rmm_sales_invoice_row_rmm_sales_invoice1    | fk_rmm_sales_invoice_row_rmm_sales_invoice1    | 4       | racefi.rmm_sales_invoice.sales_invoice_id       |     1 |               |
|  7 | UNION        | rmm_sales_invoice      | index  | NULL                                           | PRIMARY                                        | 4       | NULL                                            |     6 | Using index   |
|  7 | UNION        | rmm_sales_remittance   | ref    | credit_invoice_id                              | credit_invoice_id                              | 5       | racefi.rmm_sales_invoice.sales_invoice_id       |   457 |               |
|  7 | UNION        | rmm_sales_invoice_row  | ref    | fk_rmm_sales_invoice_row_rmm_sales_invoice1    | fk_rmm_sales_invoice_row_rmm_sales_invoice1    | 4       | racefi.rmm_sales_invoice.sales_invoice_id       |     1 |               |
| NULL | UNION RESULT | <union6,7>             | ALL    | NULL                                           | NULL                                           | NULL    | NULL                                            |  NULL |             |
+----+--------------+------------------------+--------+------------------------------------------------+------------------------------------------------+---------+-------------------------------------------------+-------+---------------+
20 rows in set (13.67 sec)








********************TABLE STATUS...*********************
mysql> SHOW TABLE STATUS;
+--------------------------------------+--------+---------+------------+--------+----------------+-------------+-----------------+--------------+-----------+----------------+---------------------+---------------------+------------------+
| Name                                 | Engine | Version | Row_format | Rows   | Avg_row_length | Data_length | Max_data_length | Index_length | Data_free | Auto_increment | Create_time         | Update_time         | Check_time       |
+--------------------------------------+--------+---------+------------+--------+----------------+-------------+-----------------+--------------+-----------+----------------+---------------------+---------------------+------------------+
| clover_shop_fi_categories            | MyISAM |      10 | Dynamic    |    689 |             87 |       60184 | 281474976710655 |        12288 |         0 |            942 | 2013-03-01 12:29:33 | 2013-03-01 12:29:33 | 2013-04-18 12:59:|
| clover_shop_fi_contest               | MyISAM |      10 | Dynamic    |      0 |              0 |           0 | 281474976710655 |         1024 |         0 |              1 | 2013-03-01 12:29:33 | 2013-03-01 12:29:33 | 2013-04-18 12:59:|
| clover_shop_fi_contestants           | MyISAM |      10 | Dynamic    |      0 |              0 |           0 | 281474976710655 |         1024 |         0 |              1 | 2013-03-01 12:29:33 | 2013-03-01 12:29:33 | 2013-04-18 12:59:|
| clover_shop_fi_customers             | MyISAM |      10 | Dynamic    |   1048 |            245 |      257700 | 281474976710655 |        13312 |         0 |           1078 | 2013-03-01 12:29:33 | 2013-03-01 12:29:33 | 2013-04-18 12:59:|
| clover_shop_fi_delivery_costs        | MyISAM |      10 | Dynamic    |      1 |           1100 |        1100 | 281474976710655 |         2048 |         0 |             19 | 2013-03-01 12:29:33 | 2013-03-01 12:29:33 | 2013-04-18 12:59:|
| clover_shop_fi_news                  | MyISAM |      10 | Dynamic    |     42 |            548 |       23028 | 281474976710655 |         2048 |         0 |             49 | 2013-03-01 12:29:33 | 2013-03-01 12:29:33 | 2013-04-18 12:59:|
| clover_shop_fi_newsletter_recipients | MyISAM |      10 | Dynamic    |    166 |             66 |       10972 | 281474976710655 |         4096 |         0 |            167 | 2013-03-01 12:29:33 | 2013-03-01 12:29:33 | 2013-04-18 12:59:|
| clover_shop_fi_options               | MyISAM |      10 | Dynamic    |   1701 |             79 |      135156 | 281474976710655 |        45056 |         0 |           2028 | 2013-03-01 12:29:33 | 2013-03-01 12:29:33 | 2013-04-18 12:59:|
| clover_shop_fi_orders                | MyISAM |      10 | Dynamic    |    764 |           4900 |     3744128 | 281474976710655 |        24576 |         0 |           1161 | 2013-03-01 12:29:33 | 2013-03-01 12:29:33 | 2013-04-18 12:59:|
| clover_shop_fi_products              | MyISAM |      10 | Dynamic    |   7660 |            840 |     6440168 | 281474976710655 |       192512 |         0 |          22932 | 2013-03-01 12:29:33 | 2013-03-01 12:29:34 | 2013-04-18 12:59:|
| clover_shop_fi_promotion_campaigns   | MyISAM |      10 | Dynamic    |      5 |             35 |         176 | 281474976710655 |         2048 |         0 |             12 | 2013-03-01 12:29:34 | 2013-03-01 12:29:34 | 2013-04-18 12:59:|
| clover_shop_fi_settings              | MyISAM |      10 | Dynamic    |      1 |            404 |         404 | 281474976710655 |         2048 |         0 |              2 | 2013-03-01 12:29:34 | 2013-03-01 12:29:34 | 2013-04-18 12:59:|
| rmm_A2C                              | InnoDB |      10 | Compact    |  42122 |             37 |     1589248 |               0 |      3178496 |  55574528 |           NULL | 2013-04-18 12:59:21 | NULL                | NULL             |
| rmm_BE2BC                            | InnoDB |      10 | Compact    |    491 |             33 |       16384 |               0 |        49152 |  55574528 |           1017 | 2013-04-18 12:59:21 | NULL                | NULL             |
| rmm_D2P                              | InnoDB |      10 | Compact    |      6 |           2730 |       16384 |               0 |        32768 |  55574528 |              7 | 2013-04-18 12:59:21 | NULL                | NULL             |
| rmm_I2A                              | InnoDB |      10 | Compact    |  82133 |            121 |     9977856 |               0 |     31752192 |  55574528 |         136983 | 2013-04-18 12:59:36 | NULL                | NULL             |
| rmm_I2A_history                      | InnoDB |      10 | Compact    |  28050 |             94 |     2637824 |               0 |      2064384 |  55574528 |           NULL | 2013-04-18 12:59:38 | NULL                | NULL             |
| rmm_I2S                              | InnoDB |      10 | Compact    |  36126 |             73 |     2637824 |               0 |      4096000 |  55574528 |          70540 | 2013-04-18 12:59:39 | NULL                | NULL             |
| rmm_S2B                              | InnoDB |      10 | Compact    |      3 |           5461 |       16384 |               0 |        32768 |  55574528 |           NULL | 2013-04-18 12:59:39 | NULL                | NULL             |
| rmm_U2C                              | InnoDB |      10 | Compact    |   2192 |             44 |       98304 |               0 |       212992 |  55574528 |           2299 | 2013-04-18 12:59:39 | NULL                | NULL             |
| rmm_account                          | InnoDB |      10 | Compact    |      4 |           4096 |       16384 |               0 |            0 |  55574528 |              5 | 2013-04-18 12:59:39 | NULL                | NULL             |
| rmm_account_transaction              | InnoDB |      10 | Compact    |   2813 |             81 |      229376 |               0 |        65536 |  55574528 |           2806 | 2013-04-18 12:59:39 | NULL                | NULL             |
| rmm_article_history                  | InnoDB |      10 | Compact    |   3543 |            448 |     1589248 |               0 |            0 |  55574528 |           3636 | 2013-04-18 12:59:40 | NULL                | NULL             |
| rmm_article_media                    | InnoDB |      10 | Compact    |   8385 |             33 |      278528 |               0 |       409600 |  55574528 |          61148 | 2013-04-18 12:59:40 | NULL                | NULL             |
| rmm_article_properties               | InnoDB |      10 | Compact    |  66121 |             55 |     3686400 |               0 |      9469952 |  55574528 |         194727 | 2013-04-18 12:59:46 | NULL                | NULL             |
| rmm_articles                         | InnoDB |      10 | Compact    |  14125 |            112 |     1589248 |               0 |      1589248 |  55574528 |          44666 | 2013-04-18 12:59:47 | NULL                | NULL             |
| rmm_blog_categories                  | InnoDB |      10 | Compact    |     31 |            528 |       16384 |               0 |        16384 |  55574528 |             34 | 2013-04-18 12:59:48 | NULL                | NULL             |
| rmm_blog_comments                    | InnoDB |      10 | Compact    |      0 |              0 |       16384 |               0 |        16384 |  55574528 |              1 | 2013-04-18 12:59:48 | NULL                | NULL             |
| rmm_blog_entries                     | InnoDB |      10 | Compact    |    169 |             96 |       16384 |               0 |        32768 |  55574528 |            173 | 2013-04-18 12:59:48 | NULL                | NULL             |
| rmm_brand_media                      | InnoDB |      10 | Compact    |      0 |              0 |       16384 |               0 |        49152 |  55574528 |              1 | 2013-04-18 12:59:48 | NULL                | NULL             |
| rmm_brands                           | InnoDB |      10 | Compact    |     84 |            195 |       16384 |               0 |        32768 |  55574528 |             89 | 2013-04-18 12:59:48 | NULL                | NULL             |
| rmm_campaign                         | InnoDB |      10 | Compact    |     14 |           1170 |       16384 |               0 |        32768 |  55574528 |             24 | 2013-04-18 12:59:48 | NULL                | NULL             |
| rmm_cn_connection                    | InnoDB |      10 | Compact    |    215 |             76 |       16384 |               0 |        32768 |  55574528 |           NULL | 2013-04-18 12:59:48 | NULL                | NULL             |
| rmm_content                          | InnoDB |      10 | Compact    |   1677 |             87 |      147456 |               0 |       114688 |  55574528 |           1842 | 2013-04-18 12:59:48 | NULL                | NULL             |
| rmm_content_localised                | InnoDB |      10 | Compact    |   1736 |            915 |     1589248 |               0 |       114688 |  55574528 |           3267 | 2013-04-18 12:59:48 | NULL                | NULL             |
| rmm_currencies                       | InnoDB |      10 | Compact    |      5 |           3276 |       16384 |               0 |        16384 |  55574528 |              6 | 2013-04-18 12:59:48 | NULL                | NULL             |
| rmm_currency_rates                   | InnoDB |      10 | Compact    |      3 |           5461 |       16384 |               0 |            0 |  55574528 |              4 | 2013-04-18 12:59:48 | NULL                | NULL             |
| rmm_customer_properties              | InnoDB |      10 | Compact    |      0 |              0 |       16384 |               0 |        16384 |  55574528 |           NULL | 2013-04-18 12:59:48 | NULL                | NULL             |
| rmm_customers                        | InnoDB |      10 | Compact    |   3490 |            131 |      458752 |               0 |       311296 |  55574528 |           3627 | 2013-04-18 12:59:48 | NULL                | NULL             |
| rmm_db_gtime                         | MyISAM |      10 | Dynamic    | 763715 |             52 |    40350964 | 281474976710655 |         1024 |         0 |           NULL | 2013-04-16 20:58:09 | 2013-04-26 15:58:52 | 2013-04-18 12:59:|
| rmm_delivery_methods                 | InnoDB |      10 | Compact    |      3 |           5461 |       16384 |               0 |            0 |  55574528 |              4 | 2013-04-18 12:59:48 | NULL                | NULL             |
| rmm_item_media                       | InnoDB |      10 | Compact    |  29947 |             53 |     1589248 |               0 |      3178496 |  55574528 |          32020 | 2013-04-18 12:59:51 | NULL                | NULL             |
| rmm_item_properties                  | InnoDB |      10 | Compact    |  28348 |             56 |     1589248 |               0 |      2080768 |  55574528 |          44560 | 2013-04-18 12:59:53 | NULL                | NULL             |
| rmm_item_reservations                | InnoDB |      10 | Compact    |   8051 |             48 |      393216 |               0 |       147456 |  55574528 |           8235 | 2013-04-18 12:59:55 | NULL                | NULL             |
| rmm_item_types                       | InnoDB |      10 | Compact    |    167 |             98 |       16384 |               0 |        49152 |  55574528 |            195 | 2013-04-18 12:59:55 | NULL                | NULL             |
| rmm_items                            | InnoDB |      10 | Compact    |  45747 |            126 |     5783552 |               0 |      6717440 |  55574528 |          64748 | 2013-04-18 13:00:05 | NULL                | NULL             |
| rmm_locales                          | InnoDB |      10 | Compact    |      4 |           4096 |       16384 |               0 |        32768 |  55574528 |              5 | 2013-04-18 13:00:05 | NULL                | NULL             |
| rmm_media                            | InnoDB |      10 | Compact    |   6605 |             81 |      540672 |               0 |       540672 |  55574528 |          53196 | 2013-04-18 13:00:05 | NULL                | NULL             |
| rmm_menu                             | InnoDB |      10 | Compact    |    383 |            128 |       49152 |               0 |        32768 |  55574528 |            549 | 2013-04-18 13:00:06 | NULL                | NULL             |
| rmm_modules_S2P                      | InnoDB |      10 | Compact    |     21 |            780 |       16384 |               0 |        49152 |  55574528 |             22 | 2013-04-18 13:00:06 | NULL                | NULL             |
| rmm_modules_payment                  | InnoDB |      10 | Compact    |      6 |           2730 |       16384 |               0 |        32768 |  55574528 |              7 | 2013-04-18 13:00:06 | NULL                | NULL             |
| rmm_modules_shipment                 | InnoDB |      10 | Compact    |      7 |           2340 |       16384 |               0 |        32768 |  55574528 |              9 | 2013-04-18 13:00:06 | NULL                | NULL             |
| rmm_mvt_env                          | InnoDB |      10 | Compact    |  89032 |             77 |     6864896 |               0 |      5783552 |  55574528 |           NULL | 2013-04-18 13:00:12 | NULL                | NULL             |
| rmm_mvt_goals                        | InnoDB |      10 | Compact    |  97934 |             59 |     5783552 |               0 |      4734976 |  55574528 |           NULL | 2013-04-18 13:00:17 | NULL                | NULL             |
| rmm_mvt_session                      | InnoDB |      10 | Compact    |  97949 |             69 |     6832128 |               0 |            0 |  55574528 |           NULL | 2013-04-18 13:00:20 | NULL                | NULL             |
| rmm_payment_methods                  | InnoDB |      10 | Compact    |      4 |           4096 |       16384 |               0 |            0 |  55574528 |              5 | 2013-04-18 13:00:20 | NULL                | NULL             |
| rmm_price_formulas                   | InnoDB |      10 | Compact    |      0 |              0 |       16384 |               0 |            0 |  55574528 |              1 | 2013-04-18 13:00:20 | NULL                | NULL             |
| rmm_properties                       | InnoDB |      10 | Compact    |     87 |            188 |       16384 |               0 |        16384 |  55574528 |          65776 | 2013-04-18 13:00:20 | NULL                | NULL             |
| rmm_property_rules                   | InnoDB |      10 | Compact    |   9967 |            159 |     1589248 |               0 |      1769472 |  55574528 |          11148 | 2013-04-18 13:00:23 | NULL                | NULL             |
| rmm_purchase_order                   | InnoDB |      10 | Compact    |      0 |              0 |       16384 |               0 |        16384 |  55574528 |              1 | 2013-04-18 13:00:23 | NULL                | NULL             |
| rmm_purchase_order_history           | InnoDB |      10 | Compact    |      0 |              0 |       16384 |               0 |        16384 |  55574528 |              1 | 2013-04-18 13:00:23 | NULL                | NULL             |
| rmm_purchase_order_row               | InnoDB |      10 | Compact    |      0 |              0 |       16384 |               0 |        32768 |  55574528 |              1 | 2013-04-18 13:00:23 | NULL                | NULL             |
| rmm_rates                            | InnoDB |      10 | Compact    |      0 |              0 |       16384 |               0 |        49152 |  55574528 |              1 | 2013-04-18 13:00:23 | NULL                | NULL             |
| rmm_remittance                       | InnoDB |      10 | Compact    |      0 |              0 |       16384 |               0 |        49152 |  55574528 |              1 | 2013-04-18 13:00:23 | NULL                | NULL             |
| rmm_sales_invoice                    | InnoDB |      10 | Compact    |   3109 |             79 |      245760 |               0 |       196608 |  55574528 |           3201 | 2013-04-18 13:00:23 | NULL                | NULL             |
| rmm_sales_invoice_history            | InnoDB |      10 | Compact    |  31277 |             84 |     2637824 |               0 |      1589248 |  55574528 |          32293 | 2013-04-18 13:00:24 | NULL                | NULL             |
| rmm_sales_invoice_row                | InnoDB |      10 | Compact    |   7077 |            224 |     1589248 |               0 |       360448 |  55574528 |           7801 | 2013-04-18 13:00:24 | NULL                | NULL             |
| rmm_sales_order                      | InnoDB |      10 | Compact    |   5457 |            291 |     1589248 |               0 |       950272 |  55574528 |           5715 | 2013-04-18 13:00:25 | NULL                | NULL             |
| rmm_sales_order_history              | InnoDB |      10 | Compact    |  81798 |             83 |     6832128 |               0 |      2637824 |  55574528 |          86215 | 2013-04-18 13:00:30 | NULL                | NULL             |
| rmm_sales_order_row                  | InnoDB |      10 | Compact    |  19483 |            135 |     2637824 |               0 |      1327104 |  55574528 |          20700 | 2013-04-18 13:00:31 | NULL                | NULL             |
| rmm_sales_order_row_history          | InnoDB |      10 | Compact    |      0 |              0 |       16384 |               0 |        16384 |  55574528 |              1 | 2013-04-18 13:00:31 | NULL                | NULL             |
| rmm_sales_remittance                 | InnoDB |      10 | Compact    |   2796 |             70 |      196608 |               0 |       245760 |  55574528 |           2979 | 2013-04-18 13:00:31 | NULL                | NULL             |
| rmm_sales_shipment                   | InnoDB |      10 | Compact    |   3033 |             91 |      278528 |               0 |       409600 |  55574528 |           3043 | 2013-04-18 13:00:32 | NULL                | NULL             |
| rmm_sales_shipment_history           | InnoDB |      10 | Compact    |   4896 |             73 |      360448 |               0 |       114688 |  55574528 |           4816 | 2013-04-18 13:00:33 | NULL                | NULL             |
| rmm_sales_shipment_row               | InnoDB |      10 | Compact    |   9525 |            166 |     1589248 |               0 |       655360 |  55574528 |          10630 | 2013-04-18 13:00:34 | NULL                | NULL             |
| rmm_settings                         | InnoDB |      10 | Compact    |      5 |           3276 |       16384 |               0 |        32768 |  55574528 |              6 | 2013-04-18 13:00:34 | NULL                | NULL             |
| rmm_shelves                          | InnoDB |      10 | Compact    |      2 |           8192 |       16384 |               0 |        32768 |  55574528 |              8 | 2013-04-18 13:00:34 | NULL                | NULL             |
| rmm_sites                            | InnoDB |      10 | Compact    |      1 |          16384 |       16384 |               0 |            0 |  55574528 |              2 | 2013-04-18 13:00:34 | NULL                | NULL             |
| rmm_staff                            | InnoDB |      10 | Compact    |      1 |          16384 |       16384 |               0 |        16384 |  55574528 |              2 | 2013-04-18 13:00:34 | NULL                | NULL             |
| rmm_stocks                           | InnoDB |      10 | Compact    |      0 |              0 |       16384 |               0 |        49152 |  55574528 |              1 | 2013-04-18 13:00:34 | NULL                | NULL             |
| rmm_supplier_discount_group          | InnoDB |      10 | Compact    |     52 |            315 |       16384 |               0 |        16384 |  55574528 |             61 | 2013-04-18 13:00:34 | NULL                | NULL             |
| rmm_suppliers                        | InnoDB |      10 | Compact    |     28 |            585 |       16384 |               0 |            0 |  55574528 |             35 | 2013-04-18 13:00:34 | NULL                | NULL             |
| rmm_task                             | InnoDB |      10 | Compact    |      3 |           5461 |       16384 |               0 |        32768 |  55574528 |              6 | 2013-04-18 13:00:34 | NULL                | NULL             |
| rmm_task_group                       | InnoDB |      10 | Compact    |      5 |           3276 |       16384 |               0 |        16384 |  55574528 |              6 | 2013-04-18 13:00:34 | NULL                | NULL             |
| rmm_task_status                      | InnoDB |      10 | Compact    |      2 |           8192 |       16384 |               0 |        16384 |  55574528 |              3 | 2013-04-18 13:00:34 | NULL                | NULL             |
| rmm_toll_tax                         | InnoDB |      10 | Compact    |      1 |          16384 |       16384 |               0 |            0 |  55574528 |              2 | 2013-04-18 13:00:34 | NULL                | NULL             |
| rmm_user_privilidges                 | InnoDB |      10 | Compact    |      9 |           1820 |       16384 |               0 |        16384 |  55574528 |             13 | 2013-04-18 13:00:34 | NULL                | NULL             |
| rmm_user_properties                  | InnoDB |      10 | Compact    |      9 |           1820 |       16384 |               0 |        16384 |  55574528 |           NULL | 2013-04-18 13:00:34 | NULL                | NULL             |
| rmm_users                            | InnoDB |      10 | Compact    |   2129 |            153 |      327680 |               0 |       245760 |  55574528 |           2305 | 2013-04-18 13:00:35 | NULL                | NULL             |
| rmm_vat_tax                          | InnoDB |      10 | Compact    |      4 |           4096 |       16384 |               0 |            0 |  55574528 |              5 | 2013-04-18 13:00:35 | NULL                | NULL             |
| rmm_viewkeys                         | InnoDB |      10 | Compact    |   5553 |             67 |      376832 |               0 |            0 |  55574528 |           5719 | 2013-04-18 13:00:35 | NULL                | NULL             |
| rmm_warehouse                        | InnoDB |      10 | Compact    |      1 |          16384 |       16384 |               0 |            0 |  55574528 |              2 | 2013-04-18 13:00:35 | NULL                | NULL             |
+--------------------------------------+--------+---------+------------+--------+----------------+-------------+-----------------+--------------+-----------+----------------+---------------------+---------------------+------------------+
92 rows in set (0.64 sec)


Options: ReplyQuote


Subject
Views
Written By
Posted
Re: A very slow query on InnoDb 5.1.67
1148
April 26, 2013 07:06AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.