|
On 22-Jul-2010 08:12, Charles Wilt wrote:a
I've got a 3.1 million row table with a 25 character field that holds
(perhaps full index) scan.
We currently perform seraches by address like so:
select * from myTable where address like '%MAIN%'
Given the leading '%', I know the search will require a full table
and
Given that the average TRIM'd length of the data in the field is 16
any trailing blanks to compare too and thus my searchesthinking that if I changed the field to varying, the DB wouldn't have
performance is worse by a couple of percent!should be about 36% faster...
However, I'm not seeing a 36% improvement. In fact, it appears that
could
Since a blank is not the prefix of the data being searched, you
Try searching on '% MAIN%' instead, to effect a better test; not thatI
without averaged repeated tests including reversed order of any twocompared scenarios.
effect]
By the way, also try ALLOCATE(0) [or whatever syntax has that
optimization, at the LIC DB level that storage could be the bestpossible
for completing the processing the quickest. If the query has thecapability to interrogate only the AuxSID, that could be similar to
an index-only access, whereby all of the processed data is effectivelycontiguous.
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.