Query with More than one table, which having same structure (1 Viewer)

ootkhopdi

Registered User.
Local time
Today, 17:43
Joined
Oct 17, 2013
Messages
181
Hi. All


I have a database with more than 100000 records. this data belongs to about 5000 employee with last 10 years..so it is so huge.due to this big data , when i run any query , it runs too much slow. so i want to break this data into 3 or 4 tables.
But i want , when i want to search or select some record in this database, how can i do it.


i want to create an update query to update records to all tables or search any records, or select some records in a query..




so please give me help.. how can i do the same


i have a little knowledge in access, but i want to gain it..


so please tell me how can i link all tables ,for the same.


thanks
 

plog

Banishment Pending
Local time
Today, 07:13
Joined
May 11, 2011
Messages
11,646
But i want , when i want to search or select some record in this database, how can i do it.

Huh? I can't parse what you want.

I can tell you that (1) 100,000 records is nothing, (2) 3-4 tables is a bad idea, (3) UPDATE queries are generally hacks used by people with poor understanding of how databases work.

There are things you can do to speed up queries:

https://www.google.com/search?q=how...0.0l3j69i64.5105j1j7&sourceid=chrome&ie=UTF-8

If those don't work, post back either the SQL of your query or a trimmed down version of your database.
 

The_Doc_Man

Immoderate Moderator
Staff member
Local time
Today, 07:13
Joined
Feb 28, 2001
Messages
27,179
OK, here is the sad truth. Splitting something up into multiple tables through Access does not help you. Making the tables smaller works until you need to rejoin the multiple tables to do a global search. If you were going to have, let's say five tables, each holding about 20% of the records, then you have extra overhead when you need to search all of the tables for something and that something is not the table's primary key.

No matter how you split this, Access is essentially single-threaded. Even if you had multiple front-ends on different machines with a shared Access back-end to try to speed up your processing, the file locks might make this not work any faster. In fact, that might make things SLOWER.

The TYPICAL way to speed things up is to assure that you have indexes on your tables. If you have indexes on the fields you are most likely to search for selective values, you will find a tremendous improvement in responsiveness. If your update also depends on one or more of the indexed fields, that query ALSO benefits from the presence of an index.

Splitting and then relinking the tables multiplies your overhead by a serious amount and is likely to cause database bloat because of the temporary lists Access has to create to keep track of what it is doing. You will find a lot of database Compact & Repair operations will be needed because of those splits.

From a programming standpoint, my advice is to read up on Indexes for Access tables and also learn to use database normalization to the greatest extent.

For instance, if your 100,000 records includes lots of department names or common text values, it might be possible to normalize those fields to numbers joined to a secondary table for lookup purposes. If you have department names that can be longer than four characters then you can have a LONG department ID that in your main table would be shorter than the actual department name.

Since you claim limited knowledge of Access, I believe our best bet will be this advice:

1. Read up on database normalization as a way to shrink the size of your main table's records. The shorter the records, the more you can read in a disk buffer and the faster you can scan the records when a scan is needed.

2. Read up on database table indexes as a way to make your searches more efficient. It is possible to do overkill on indexes, but you certainly can have more than one index on the same table - just different fields of the table.

3. Avoid VBA recordset operations like the plague if at all possible. Learn to use SQL as your primary method of dealing with your big table. VBA code is interpreted (or perhaps it is emulating a hypothetical virtual machine, it's hard to say which). SQL processing, however, is mostly compiled code and is more efficient by a huge factor. Like 10-fold or better. Depending on the size of the table and the size of a record and the complexity of the action, 100-fold improvement is not impossible.
 

ootkhopdi

Registered User.
Local time
Today, 17:43
Joined
Oct 17, 2013
Messages
181
Thanks to Both , "Plog" and "The Doc Man".
both of you , give me good ways, now i try your suggestions.



hope in future like this, i got your guidance ..
thanks once again..


Can i talk in other language as my language is HINDI..
 

The_Doc_Man

Immoderate Moderator
Staff member
Local time
Today, 07:13
Joined
Feb 28, 2001
Messages
27,179
I would take a shot at it if you answered in Cajun French, but I'm afraid Hindi is outside of my skill set.
 

jdraw

Super Moderator
Staff member
Local time
Today, 08:13
Joined
Jan 23, 2006
Messages
15,379
ootkhopdi,

You can use Google translate to get from English to Hindi OR from Hindi to English. Usually more than sufficient for communications.

आप अंग्रेजी से हिंदी या हिंदी से अंग्रेजी तक जाने के लिए Google अनुवाद का उपयोग कर सकते हैं। आम तौर पर संचार के लिए पर्याप्त से अधिक।

aap angrejee se hindee ya hindee se angrejee tak jaane ke lie googlai anuvaad ka upayog kar sakate hain. aam taur par sanchaar ke lie paryaapt se adhik.
 

Mark_

Longboard on the internet
Local time
Today, 05:13
Joined
Sep 12, 2017
Messages
2,111
JDraw,

Doesn't always work well though. I've seen Google translate perfectly understandable Deutche into totally bizarre English...
 

jdraw

Super Moderator
Staff member
Local time
Today, 08:13
Joined
Jan 23, 2006
Messages
15,379
@Mark,

Agreed, but it's much better than no translation or no response.
I have seen some Japanese t-shirts and signs that got a "translation to English" that are quite humorous (and bizarre).
 

Users who are viewing this thread

Top Bottom