FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour FWMARIADB: ::Seek() VS ::SetFilter(). how speed difference?
Posts: 1598
Joined: Fri Oct 07, 2005 05:56 PM
FWMARIADB: ::Seek() VS ::SetFilter(). how speed difference?
Posted: Mon Dec 04, 2017 03: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 2304 / 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)
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: FWMARIADB: ::Seek() VS ::SetFilter(). how speed difference?
Posted: Tue Dec 05, 2017 02: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 (fw): Select all Collapse
lFound := oRs:Locate( "age > 40 and state = 'NY'" )  // First occurence
if lFound
   oRs:Locate()  // second occurence
endif
Regards



G. N. Rao.

Hyderabad, India
Posts: 1598
Joined: Fri Oct 07, 2005 05:56 PM
Re: FWMARIADB: ::Seek() VS ::SetFilter(). how speed difference?
Posted: Wed Dec 06, 2017 01: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 2304 / 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)

Continue the discussion