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

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

Postby dutch » Mon Dec 04, 2017 3:33 am

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
Regards,
Dutch

FWH 19.01 / xHarbour Simplex 1.2.3 / BCC73 / Pelles C / UEStudio
FWPPC 10.02 / Harbour for PPC (FTDN)
ADS V.9 / MySql / MariaDB
R&R 12 Infinity / Crystal Report XI R2
(Thailand)
User avatar
dutch
 
Posts: 1535
Joined: Fri Oct 07, 2005 5:56 pm
Location: Thailand

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

Postby nageswaragunupudi » Tue Dec 05, 2017 2:46 am

: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
 
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10206
Joined: Sun Nov 19, 2006 5:22 am
Location: India

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

Postby dutch » Wed Dec 06, 2017 1:24 pm

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
Regards,
Dutch

FWH 19.01 / xHarbour Simplex 1.2.3 / BCC73 / Pelles C / UEStudio
FWPPC 10.02 / Harbour for PPC (FTDN)
ADS V.9 / MySql / MariaDB
R&R 12 Infinity / Crystal Report XI R2
(Thailand)
User avatar
dutch
 
Posts: 1535
Joined: Fri Oct 07, 2005 5:56 pm
Location: Thailand


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: nageswaragunupudi and 12 guests