Solved

Help Normalizing a Database

Posted on 2011-02-28
3
235 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:Kdo
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:
Kdo 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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
paypal ipn to mysql 3 38
Really simple no curl. Send a post 3 times 4 25
PHP Form Calculate Total Price 10 42
MySQL Backup Strategy 15 24
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…
The viewer will learn how to count occurrences of each item in an array.

777 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