B
BlueWolverine
Hello,
MS ACCESS 2003 on XP PRO.
I wrote search panel for my database. I used to have it setup where it
would pull all the data together into one query and then run the criteria
searches on it. that took 2 seconds.
A buddy of mine with database training recommended writing steps of queries,
such that Query1 cuts out some data, Query2 cuts some data out of Query1, and
so on. Thus, i'd only ever be passing smaller and smaller subsets of ID
numbers, and then I'd pull up all the data needed for those IDS. Make sense
to me, but it takes for EVER. 10 seconds to run the whole search with one
step taking around 5 seconds.
My buddy told me to avoid the use of "Like" comparisons, which I have to
use, but I tried to use them as late as possible so as to minimize the data
being inefficiently compared.
I think I have things appropriately indexed but every time I run the
Performance Analyzer, it wants me to index another field in my table. Is the
point of indexing lost if you index every field? Or can I do that ?
I will include the code for the most time consuming query. The others are
slow, but not more than 1/2 second each.
SELECT t_CCC_Listing.ID
FROM t_CCC_Listing LEFT JOIN t_CCCMap_Unique ON
left(t_CCC_Listing.CCC,3)=left(t_CCCMap_Unique.CCC,3)
WHERE ((((t_CCCMap_Unique.CCC)=Forms!f_SearchPanel!CCCSearch) Or
isnull(Forms!f_SearchPanel!CCCSearch)) And
(((t_CCCMap_Unique.VFG)=Forms!f_SearchPanel!VFGSearch) Or
isnull(Forms!f_SearchPanel!VFGSearch)) And
(((t_CCCMap_Unique.VRT)=Forms!f_SearchPanel!VRTSearch) Or
isnull(Forms!f_SearchPanel!VRTSearch)))
GROUP BY t_CCC_Listing.ID
ORDER BY t_CCC_Listing.ID;
ANY ideas are appreciated.
MS ACCESS 2003 on XP PRO.
I wrote search panel for my database. I used to have it setup where it
would pull all the data together into one query and then run the criteria
searches on it. that took 2 seconds.
A buddy of mine with database training recommended writing steps of queries,
such that Query1 cuts out some data, Query2 cuts some data out of Query1, and
so on. Thus, i'd only ever be passing smaller and smaller subsets of ID
numbers, and then I'd pull up all the data needed for those IDS. Make sense
to me, but it takes for EVER. 10 seconds to run the whole search with one
step taking around 5 seconds.
My buddy told me to avoid the use of "Like" comparisons, which I have to
use, but I tried to use them as late as possible so as to minimize the data
being inefficiently compared.
I think I have things appropriately indexed but every time I run the
Performance Analyzer, it wants me to index another field in my table. Is the
point of indexing lost if you index every field? Or can I do that ?
I will include the code for the most time consuming query. The others are
slow, but not more than 1/2 second each.
SELECT t_CCC_Listing.ID
FROM t_CCC_Listing LEFT JOIN t_CCCMap_Unique ON
left(t_CCC_Listing.CCC,3)=left(t_CCCMap_Unique.CCC,3)
WHERE ((((t_CCCMap_Unique.CCC)=Forms!f_SearchPanel!CCCSearch) Or
isnull(Forms!f_SearchPanel!CCCSearch)) And
(((t_CCCMap_Unique.VFG)=Forms!f_SearchPanel!VFGSearch) Or
isnull(Forms!f_SearchPanel!VFGSearch)) And
(((t_CCCMap_Unique.VRT)=Forms!f_SearchPanel!VRTSearch) Or
isnull(Forms!f_SearchPanel!VRTSearch)))
GROUP BY t_CCC_Listing.ID
ORDER BY t_CCC_Listing.ID;
ANY ideas are appreciated.