Solved

Help Normalizing a Database

Posted on 2011-02-28
3
236 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

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
Inserting data into database 10 34
Uploading a CSV Data Import via PHP & MySql 3 29
Log in through ID 5 17
Correct syntax for subdirectories 9 18
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…
When table data gets too large to manage or queries take too long to execute the solution is often to buy bigger hardware or assign more CPUs and memory resources to the machine to solve the problem. However, the best, cheapest and most effective so…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

790 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