here is the situation, I'll try to be as detailed as possible
I have two tables in SQL 2008 R2, on windows 64 bit, with 40 gigs of ram, and 4x quad core processors.
Table 1, has about 60,000 recods in it
Table 2 has about 25,000,000 record
Both of these tables are in SQL, (database size about 60 gigs).
Im accessing them using Access 2007 links.
Its an update query to update the cost and quantity available
which looks like
UPDATE InventorySuppliers
SET BoydQuantityAvailable = Boyd0004Books.SumOfQOH, Cost = Boyd0004Books.Cost, BoydOldCost = InventorySuppliers.Cost, BoydAvailDate = { fn NOW() }
FROM Boyd0004Books INNER JOIN
InventorySuppliers ON Boyd0004Books.ISBN = InventorySuppliers.LocalSKU
WHERE (InventorySuppliers.SupplierID = 4) AND (NOT (InventorySuppliers.BoydQuantityAvailable = Boyd0004Books.SumOfQOH)) or (InventorySuppliers.SupplierID = 4) AND (NOT (InventorySuppliers.Cost = Boyd0004Books.Cost))
When these changes take place, then a trigger takes over and does some calculations on the fields.
My problems are as follows. The queries either
1) Runs completely, and then the Access database doesnt close out the query telling me its done, (and I know it finished because when I run the same query in SQL, it tells me no changes to be made). I heard there is a bug that causes this, but I cant find a solution.
or
2) The query takes forever, hours even.
If I shut the trigger off, and run the query in SQL, takes maybe 30 seconds, but shutting the trigger off isnt an answer.
My question is this, is there a way to have SQL not run the triggers until after I've made all of the updates, or is there a better ay to run the query to makeit more efficient? I've tried everything I can think of, including only updating the cost, and then the quantity, but that just makes the trigger run twice.. I've even tried running in Access 2010 and no difference.
Appreciate the input, I've been trying things non stop for days.
I have two tables in SQL 2008 R2, on windows 64 bit, with 40 gigs of ram, and 4x quad core processors.
Table 1, has about 60,000 recods in it
Table 2 has about 25,000,000 record
Both of these tables are in SQL, (database size about 60 gigs).
Im accessing them using Access 2007 links.
Its an update query to update the cost and quantity available
which looks like
UPDATE InventorySuppliers
SET BoydQuantityAvailable = Boyd0004Books.SumOfQOH, Cost = Boyd0004Books.Cost, BoydOldCost = InventorySuppliers.Cost, BoydAvailDate = { fn NOW() }
FROM Boyd0004Books INNER JOIN
InventorySuppliers ON Boyd0004Books.ISBN = InventorySuppliers.LocalSKU
WHERE (InventorySuppliers.SupplierID = 4) AND (NOT (InventorySuppliers.BoydQuantityAvailable = Boyd0004Books.SumOfQOH)) or (InventorySuppliers.SupplierID = 4) AND (NOT (InventorySuppliers.Cost = Boyd0004Books.Cost))
When these changes take place, then a trigger takes over and does some calculations on the fields.
My problems are as follows. The queries either
1) Runs completely, and then the Access database doesnt close out the query telling me its done, (and I know it finished because when I run the same query in SQL, it tells me no changes to be made). I heard there is a bug that causes this, but I cant find a solution.
or
2) The query takes forever, hours even.
If I shut the trigger off, and run the query in SQL, takes maybe 30 seconds, but shutting the trigger off isnt an answer.
My question is this, is there a way to have SQL not run the triggers until after I've made all of the updates, or is there a better ay to run the query to makeit more efficient? I've tried everything I can think of, including only updating the cost, and then the quantity, but that just makes the trigger run twice.. I've even tried running in Access 2010 and no difference.
Appreciate the input, I've been trying things non stop for days.
Last edited: