query freeze

Danny20

New member
Local time
Today, 13:52
Joined
Dec 2, 2020
Messages
5
The query go fast with a function VBA in the query , but if I want to make a Create table the query hangs. The VBA I use to put strings together in one field

here is my data in upload file, alink to wetranfer because it's to big

solution? or a bug in access? a insert query the same problem
 

Attachments

you dont need to be making tables on a regular basis. All your tables should already exist.
if you are loading data, empty the existing table, then run an append query.
 
This give the same problem a append query in my query
 
This give the same problem a append query in my query
Hi. If the query works fine, and you can see the calculated data and you can use them on your report, I guess the question was, why did you need to make a table out of it? Are you trying to export the data at some point? Or maybe another reason?
 
everything comes in one form, with a lot of subforms and therefore a lot of data
if you're working from a query then everything works way too slow.
 
everything comes in one form, with a lot of subforms and therefore a lot of data
if you're working from a query then everything works way too slow.
You just contradicted yourself. In your original post, you said using the query is fast. But now, you're saying using it is way too slow.

In any case, if you really want to create a table, you could try using a recordset instead of a make table query.
 
I did this in the beginning with VBA, but then the data base grows over 2GB and crashes,

why i need this I make CUBS, alredy filtered data.
The query is over 300000 records.
 
I did this in the beginning with VBA, but then the data base grows over 2GB and crashes,

why i need this I make CUBS, alredy filtered data.
The query is over 300000 records.
If you continually create tables, they must be temporary tables. If so, consider using a temporary database.

Have a look at the following articles:


 
based on post#5, I'm going on a different tack - perhaps the maketable isn't hanging, just taking a long time.

When you open a select query, it will display the first few records returned fairly quickly whilst it continues to process the rest of the records. The recordset is not fully populated until you can see the recordcount at the bottom. So when you run your query as a sel;ect query, how long until the recordcount is populated?

When you run an action query such as maketable or insert query, it will not appear to be doing anything until the entire recordset has been processed. Also it needs to update the indexes - which will add to the time taken.

So you have a large number of records - are all relevant fields indexed? Is the query optimised for best performance (i.e. no domain functions, sub queries, no use of the like * predicate etc) These will all have an impact on performance.

Your link doesn't work so cannot assess what your data looks like

From your comments, which appears to be that a form takes too long to open, I suspect you are not applying good practice for large datasets.

Good practice is to open the form with a minimal number of records - none, or 1 or 2 or perhaps 20 or 30 for a continuous form. This is done by applying criteria (not filter) in the recordsource in the form open event. Further, Subforms open before the main form - so these should be opened with an empty recordset and subsequently populated in the main form current event - or if on different tabs, consider not populating until the relevant tab is selected. Similar principles apply for combo and list boxes - these should not be populated with a list of 30,000+ customers/suppliers/whatever. Again they should have criteria applied - perhaps by not populating the rowsource until 2 or 3 characters have been typed by the user.

All of these features can be created using VBA
 
based on post#5, I'm going on a different tack - perhaps the maketable isn't hanging, just taking a long time.

When you open a select query, it will display the first few records returned fairly quickly whilst it continues to process the rest of the records. The recordset is not fully populated until you can see the recordcount at the bottom. So when you run your query as a sel;ect query, how long until the recordcount is populated?

When you run an action query such as maketable or insert query, it will not appear to be doing anything until the entire recordset has been processed. Also it needs to update the indexes - which will add to the time taken.

So you have a large number of records - are all relevant fields indexed? Is the query optimised for best performance (i.e. no domain functions, sub queries, no use of the like * predicate etc) These will all have an impact on performance.

Your link doesn't work so cannot assess what your data looks like

From your comments, which appears to be that a form takes too long to open, I suspect you are not applying good practice for large datasets.

Good practice is to open the form with a minimal number of records - none, or 1 or 2 or perhaps 20 or 30 for a continuous form. This is done by applying criteria (not filter) in the recordsource in the form open event. Further, Subforms open before the main form - so these should be opened with an empty recordset and subsequently populated in the main form current event - or if on different tabs, consider not populating until the relevant tab is selected. Similar principles apply for combo and list boxes - these should not be populated with a list of 30,000+ customers/suppliers/whatever. Again they should have criteria applied - perhaps by not populating the rowsource until 2 or 3 characters have been typed by the user.

All of these features can be created using VBA
the query takes 2 sec and I see already the recordcount in the bottom,

I have data like :
Pnr Stap Machine
1 10 M01
1 20 M05
1 30 M08
2 10 M36
2 20 M10

the query must give
1 10 M01 M01_M05_M08
1 20 M05 M01_M05_M08
1 30 M08 M01_M05_M08
2 10 M36 M36_M10
2 20 M10 M36_M10

I do this with a query and with VBA link. But it's strange that the create table not works.
 

Users who are viewing this thread

Back
Top Bottom