Page 1 of 1

FWMARIADB: ::Seek() VS ::SetFilter(). how speed difference?

PostPosted: Mon Dec 04, 2017 3:33 am
by dutch
Dear Master,

I have tested FWMARIADB with ::Seek() and ::SetFilter() method for 7x,xxx records. I don't see any difference speed between its.

Welcome for any suggest and recommendation.

Thanks in advance.
Dutch

Re: FWMARIADB: ::Seek() VS ::SetFilter(). how speed difference?

PostPosted: Tue Dec 05, 2017 2:46 am
by nageswaragunupudi
:Seek() is always faster than :SetFilter().
Because both are extremely fast, the difference in the speed is not perceptible.

:Seek() and :SetFilter() have different purposes and you need to use one of them depending on your requirements.

:Seek() works only on a column that is sorted. If you want to locate a record on a complex condition, whether or not sorted, you may use :Locate(), which is almost as fast as :Seek()

Code: Select all  Expand view

lFound := oRs:Locate( "age > 40 and state = 'NY'" )  // First occurence
if lFound
   oRs:Locate()  // second occurence
endif
 

Re: FWMARIADB: ::Seek() VS ::SetFilter(). how speed difference?

PostPosted: Wed Dec 06, 2017 1:24 pm
by dutch
Dear Mr.Rao,

I cannot see the different both cases with 100,000 records. It's really fast.

Thank you so much again for your explanation.
Dutch