One another problem
I have used a formula in the calculated field of a query as -
IIf( [A] <=[b], (IIf([A]<=[C], [A], [C]), (IIf ([b]<=[C], [C], [b]))
the above formula is working properly to give the lowest of [A], [b] and [C] but the problem is that the query is some slow as compared to other query not having such formula. At present, there is only one record in the query to calculate and to show. I fear if what will happen if there will be lots of records.
what to do
can i use - min([A], [b], [C]) - like expression
4 3627 PEB 1,418
Recognized Expert Top Contributor
Strange!
In one record to have slow performance! Expressions like this I use in big tables like 500 000 records and I don't have a big slow down!
Maybe IIF isn't your problem?
:)
Strange!
In one record to have slow performance! Expressions like this I use in big tables like 500 000 records and I don't have a big slow down!
Maybe IIF isn't your problem?
:)
I expressed what i felt. Well your post give me confidence on this type of formula. I want to aske whether your table contians - IIf (IIf (IIf())) - type of formula which is complex.
PEB 1,418
Recognized Expert Top Contributor
See this! This returns result no for more than a few seconds! And in the concerned tables / queries there is 30000 - 40000 records! -
SELECT CROSSTAB_NORMS.[0] AS Продукт, arround(IIf([4]="Qty_Piece",Sum([Cadeaux_Commandes01].[Qty])*[CROSSTAB_NORMS].[Qty],Sum([Cadeaux_Commandes01].[Qty])/param_info(show_el_id(16,[1]),0,"COL01N0012")*[CROSSTAB_NORMS].[Qty]),1) AS Result
-
FROM Cadeaux_Commandes01 INNER JOIN CROSSTAB_NORMS ON Cadeaux_Commandes01.ART = CROSSTAB_NORMS.[1]
-
WHERE (((CROSSTAB_NORMS.[2])="Conditionnement") AND ((CROSSTAB_NORMS.[3])="Atelier") AND ((IIf(([5] Is Null) Or ([5]="All_markets"),True,IIf(Mid([5],1,2)=Mid([n°Cde],1,2),True,False)))=True))
-
GROUP BY CROSSTAB_NORMS.[0], CROSSTAB_NORMS.[1], CROSSTAB_NORMS.[4], CROSSTAB_NORMS.Qty;
-
See this! This returns result no for more than a few seconds! And in the concerned tables / queries there is 30000 - 40000 records! -
SELECT CROSSTAB_NORMS.[0] AS Продукт, arround(IIf([4]="Qty_Piece",Sum([Cadeaux_Commandes01].[Qty])*[CROSSTAB_NORMS].[Qty],Sum([Cadeaux_Commandes01].[Qty])/param_info(show_el_id(16,[1]),0,"COL01N0012")*[CROSSTAB_NORMS].[Qty]),1) AS Result
-
FROM Cadeaux_Commandes01 INNER JOIN CROSSTAB_NORMS ON Cadeaux_Commandes01.ART = CROSSTAB_NORMS.[1]
-
WHERE (((CROSSTAB_NORMS.[2])="Conditionnement") AND ((CROSSTAB_NORMS.[3])="Atelier") AND ((IIf(([5] Is Null) Or ([5]="All_markets"),True,IIf(Mid([5],1,2)=Mid([n°Cde],1,2),True,False)))=True))
-
GROUP BY CROSSTAB_NORMS.[0], CROSSTAB_NORMS.[1], CROSSTAB_NORMS.[4], CROSSTAB_NORMS.Qty;
-
Oh its amazing. Now I think that time to be taken by MS Access for such type of query is one or two seconds irrespective of the numbers of records. Thanks I will go ahead with this formula. thanks a lot. I will first feed numbers of recods in the table and watch the speed. Thax a lot
Sign in to post your reply or Sign up for a free account.
Similar topics |
by: Chumley the Walrus |
last post by:
When i put an explicit value in the sql statement below as
"displaygroup =1 ",
i do see my records (or my response.write test after the recordset
Open line) appear on my dynamic page. But when use...
|
by: Michelle |
last post by:
Hi all,
I have a query that scans huge table consists of 8 or more millions
records. The funny thing is that if I use the query with local
variable, the query takes more than 1 minutes,...
|
by: Ed_No_Spam_Please_Weber |
last post by:
Hello All & Thanks in advance for your help!
Background:
1) tblT_Documents is the primary parent transaction table that has 10
fields and about 250,000 rows
2) There are 9 child tables with...
|
by: Ellen Manning |
last post by:
Using A2K. I have a form with a combo box that runs a query and
returns a list of patients. 3 users are sharing this database and the
query runs fine for 2 of the users but not the 3rd. The...
|
by: innocentchick |
last post by:
I have a database that displays the results of my queries in a subform
within another form. As soon as I modify the query table and save the
changes, the sql code for that query is deleted. For...
| |
by: john |
last post by:
We have an mdb running on Access 2000 that was originally built in Access
97. Now, after having migrated the mdb to Access 2002 on Citrix (both the
mdb and Access reside on the Citrixserver), the...
|
by: Bob Darlington |
last post by:
The following query opens slowly the first time it is opened (6-7 seconds),
but then is less than one second for the next random number of openings
before slowing (6-7 seconds) again.
SELECT...
|
by: Ukar |
last post by:
my query is slow in testing for quick in production.
can any one help
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
| |
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
|
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...
| | |