Solved

Help Normalizing a Database

Posted on 2011-02-28
3
232 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
Comment Utility
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
Comment Utility
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
Comment Utility
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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

Part of the Global Positioning System A geocode (https://developers.google.com/maps/documentation/geocoding/) is the major subset of a GPS coordinate (http://en.wikipedia.org/wiki/Global_Positioning_System), the other parts being the altitude and t…
This article discusses four methods for overlaying images in a container on a web page
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
The viewer will learn how to dynamically set the form action using jQuery.

744 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now