Is it excpetable, or normal to wait 3 hours, 50 minutes and 39.70 seconds to run the below query?
CREATE TABLE ukbm001marketing.CampaignHistory_v2
(
AddressId int,
CampaignId int,
CampaignTypeId int,
OpenUserId nvarchar(255),
OpenDate datetime,
CloseUserId nvarchar(255),
CloseDate datetime
);
INSERT INTO ukbm001marketing.CampaignHistory_v2
SELECT a.ContactId,
b.CampaignCodeId,
c.CampaignId,
'mballinger',
now(),
NULL,
NULL -- SELECT *
FROM
ukbm001marketing.temp_ContactHistory_grtthn2009_raw a
LEFT JOIN
ukbm001marketing.temp_CampaignCode_raw b ON a.CampaignCode = b.CampaignCode
AND a.ContactDate = b.ContactDate
AND a.Load_Date = b.Load_Date
LEFT JOIN
ukbm001marketing.temp_ContactCodes_raw c ON a.ContactCode = c.ContactCode;
Tables used in the query:
ukbm001marketing.temp_ContactHistory_grtthn2009_raw
has 565,832 rowsukbm001marketing.temp_CampaignCode_raw
has 9505 rowsukbm001marketing.temp_ContactCodes_raw
has 39 rows
I ran this query in the command prompt line.
In the past I have worked with Microsoft SQL Server (set up by my IS Department). I am working on a project of my own and I have the following set up:
Installed Using EasyPHP12.1
- Apache/2.4.2 (Win32) PHP/5.4.6
- Software version: 5.5.27-log - MySQL Community Server (GPL)
Laptop Spec
- Processor: Intel(R) Core(TM) i7-2620M CPU @ 2.70ghz 2.70ghz
- RAM: 8.00 GB (7.88 GB usabale)
- System 64bit Windows System
The system was running at 50% CPU usage.
I have not indexed any of the tables. I have not given the tables any primary keys. Does this issue relate to my system performance? Is it a database design issue? Or does it a setting on the mysql server?
Many thanks in advance for your help.