Solved

Help Normalizing a Database

Posted on 2011-02-28
3
239 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Use Case: Protecting a Hybrid Cloud Infrastructure

Microsoft Azure is rapidly becoming the norm in dynamic IT environments. This document describes the challenges that organizations face when protecting data in a hybrid cloud IT environment and presents a use case to demonstrate how Acronis Backup protects all data.

Question has a verified solution.

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

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…
This post contains step-by-step instructions for setting up alerting in Percona Monitoring and Management (PMM) using Grafana.
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…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

634 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