Solved

Help Normalizing a Database

Posted on 2011-02-28
3
237 Views
Last Modified: 2013-12-13
I have a query that on average takes 10 seconds to load through mysql, but in php, takes almost a minute.  I've done an 'Explain' on the table and have attached the screenshot.  I have also taken the dw_quote_main and saved the structure.  Anything else that is needed, p lease let me know.

 sh1 sh2 sh3
0
Comment
Question by:t3chguy
  • 2
3 Comments
 
LVL 45

Expert Comment

by:Kent Olsen
ID: 34999734
Hi t3ch,


Just for a test, create a view that looks like the query, then select the view.  It should return the results in a time close to the direct query of MySQL.


Kent
0
 
LVL 1

Author Comment

by:t3chguy
ID: 34999811
I'm sorry, but I'm having trouble doing that, it keeps telling me that I have a duplicate column.
0
 
LVL 45

Accepted Solution

by:
Kent Olsen earned 500 total points
ID: 34999839
Hi T3ch,

That means that two columns in the query are unnamed, or that two columns have the same name.  You'll want to clean that up even if you don't wrap it in a view.


Kent
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Build an array called $myWeek which will hold the array elements Today, Yesterday and then builds up the rest of the week by the name of the day going back 1 week.   (CODE) (CODE) Then you just need to pass your date to the function. If i…
These days socially coordinated efforts have turned into a critical requirement for enterprises.
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

679 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question