below..
> -Original Message-
> From: Jan Steinman [mailto:j...@bytesmiths.com]
> Sent: Wednesday, September 19, 2012 8:59 PM
> To: mysql@lists.mysql.com
> Subject: Re: Making Myself Crazy
>
> Thanks for your help, Rick!
>
> Interspersed are some questions and
Thanks for your help, Rick!
Interspersed are some questions and rationales for you to shoot down... :-)
> From: Rick James
>
> s_product_sales_log has no PRIMARY KEY. All InnoDB tables 'should' have an
> explicit PK.
This table really has no identifying information. There could be two identi
) mt ON mt.pcid = tt.pcid
-- removed: WHERE mt.tot != 0
) xx
That would make mt have fewer rows, hence that unindexed JOIN could run faster.
> -Original Message-
> From: Jan Steinman [mailto:j...@bytesmiths.com]
> Sent: Tuesday, September 18, 2012 9:26 PM
> To: Rick
NULL,
`description` varchar(255) character set utf8 NOT NULL,
PRIMARY KEY (`ID`),
UNIQUE KEY `Name` (`name`),
KEY `Description` (`description`),
KEY `is_value_added` (`is_value_added`),
KEY `profit_centre` (`profit_centre`),
KEY `super` (`super`),
KEY `plant_ID` (`plant_ID`)
) ENGINE
each table.
How many rows in each table? (approx)
> -Original Message-
> From: Jan Steinman [mailto:j...@bytesmiths.com]
> Sent: Sunday, September 16, 2012 3:45 PM
> To: mysql@lists.mysql.com
> Subject: Making myself crazy...
>
> I'm having trouble figuring out how
I'm having trouble figuring out how to make a query. It seems simple, but it's
making me crazy right now. Please point out where my thinking is addled...
I have the following (simplified) table structure:
s.timelog --> s.projects --> s.profit_centres
s.product.sales --> s.products --> s.profit_