Hello,
An intern joined for a few month, a few months ago, and developped an Access database. He was in comp sci school but having worked with him a bit, he was not very good at anything computer related, especially not programming and SQL.
Anyways, I had too much work and let him do his thing. The end result needed a lot of polishing (i've been polishing it for months already) but it worked alright if you didnt look too deep.
The database schema was so simple it's not even a schema: the dude just took the 3 excel sheets our data is based on and created 3 tables from them. No foreign keys, no 'brand' table or 'product type' table, no indexes, just a big load of all the info in a table.
For our user to load the databases, we make excel or access VBA macros. In all of his, he used the access import tool line, and that caused a boatload of issues that i'm still resolving to this day.
On the other hand I have another database I made myself, with lots of tables and foreign keys to reduce the weight, indexes put on the heavy use fields to speed up querying.
All my macros to load it run through ADODB recordsets.
Both database are very similar in one thing: they have that one main table with all the big data in it.
So I made essentially the same query for both: queried directly from access all the fields on the main table (no joins) with a parameter on the "year-month" field (long integer) set at 201410.
Main table in my db: 3 millions records overall.
Query results: 50k records, 5 minutes to display it
Main table in his db: 16 millions recods overall.
Query results: 660k, less than 5 seconds to display it
Yes, his db runs much better than mine. I have 5 indexes on this table, could this be causing the slowing down? Could it be that he used access loading tool and I used ADODB? (but if this was the case, it should be gone after I repair&compact both, and I did that a lot)
Could it be that my table does have like 15 columns more than his? (the number of fields doesn't factor in, does it?)
If you read this story and something becomes evident to you that I didn't realize please do tell, because I'm losing my self-esteem quickly
Thank you
Here are the queries
Mine:
His:
An intern joined for a few month, a few months ago, and developped an Access database. He was in comp sci school but having worked with him a bit, he was not very good at anything computer related, especially not programming and SQL.
Anyways, I had too much work and let him do his thing. The end result needed a lot of polishing (i've been polishing it for months already) but it worked alright if you didnt look too deep.
The database schema was so simple it's not even a schema: the dude just took the 3 excel sheets our data is based on and created 3 tables from them. No foreign keys, no 'brand' table or 'product type' table, no indexes, just a big load of all the info in a table.
For our user to load the databases, we make excel or access VBA macros. In all of his, he used the access import tool line, and that caused a boatload of issues that i'm still resolving to this day.
On the other hand I have another database I made myself, with lots of tables and foreign keys to reduce the weight, indexes put on the heavy use fields to speed up querying.
All my macros to load it run through ADODB recordsets.
Both database are very similar in one thing: they have that one main table with all the big data in it.
So I made essentially the same query for both: queried directly from access all the fields on the main table (no joins) with a parameter on the "year-month" field (long integer) set at 201410.
Main table in my db: 3 millions records overall.
Query results: 50k records, 5 minutes to display it
Main table in his db: 16 millions recods overall.
Query results: 660k, less than 5 seconds to display it
Yes, his db runs much better than mine. I have 5 indexes on this table, could this be causing the slowing down? Could it be that he used access loading tool and I used ADODB? (but if this was the case, it should be gone after I repair&compact both, and I did that a lot)
Could it be that my table does have like 15 columns more than his? (the number of fields doesn't factor in, does it?)
If you read this story and something becomes evident to you that I didn't realize please do tell, because I'm losing my self-esteem quickly
Thank you
Here are the queries
Mine:
Code:
SELECT VIQMEL.*, VIQMEL.Annee
FROM VIQMEL
WHERE (((VIQMEL.Annee)=201410));
Code:
SELECT [Retail Info].*, [Retail Info].Période
FROM [Retail Info]
WHERE ((([Retail Info].Période)=201410));