Re: LEFT JOIN with CASE WHEN
Posted by:
Chad Brogan ()
Date: October 25, 2009 01:34PM
That would explain why it takes so long. What makes this even scarier is that the pricing table is going to grow significantly. Which means that 1641 rows is going to balloon to possibly 10,000+ or 100,000+ rows. I've got to figure out a better way of combining this data.
I'm going to go out on a limb here for some schema design advice. I've got a table of sales stored by date, customer and product. Roughly 2M+ rows. I've got a customer master and product master. The pricing table has all the fields from both masters, which seems inefficient. It has 12 PKs. I don't know how else to store pricing separate from the sales. Ideally, I need a solution that lets me record pricing by the least amount of criteria possible, and then overlay that pricing dynamically on each sales record via a query.
Thanks for the help. It's my first time posting on the forums, and I was surprised at the speed and quality of the responses.
Sorry, only registered users may post in this forum.
© 1995-2008 MySQL AB, 2008- Sun Microsystems, Inc.