FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour dbfntx very slow with 2+ users
Posts: 1091
Joined: Thu Nov 17, 2005 11:08 AM
Re: dbfntx very slow with 2+ users
Posted: Wed Apr 06, 2022 01:08 PM
don lowenstein wrote:I have a Harbour / Fivewin application that uses MSSQL tables via Mediator (3rd party RDD from OTS software).
Don,
where can I found a trial version or pricing of Mediator?
Marco Boschi
info@marcoboschi.it
Posts: 1091
Joined: Thu Nov 17, 2005 11:08 AM
Re: dbfntx very slow with 2+ users
Posted: Wed Apr 06, 2022 01:27 PM
I found in this url
http://www.otc.pl/download/default.aspx?l=2

but virustotal says is not safe
:-)
Marco Boschi
info@marcoboschi.it
Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM
Re: dbfntx very slow with 2+ users
Posted: Fri Apr 08, 2022 07:16 PM

If any of you are using filters this will be incredibly slow over a network. You need to use scopes instead.

Also, as someone else mentioned, you need to open only the databases needed for the routine, then close them when done.

FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
Posts: 6983
Joined: Fri Oct 07, 2005 07:07 PM
Re: dbfntx very slow with 2+ users
Posted: Fri Apr 08, 2022 09:36 PM

Hello James,
Thank you.
If there is no stored index, what is the best way to create one that you can use scope.
Best regards,
Otto

Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM
Re: dbfntx very slow with 2+ users
Posted: Fri Apr 08, 2022 10:19 PM
Otto,

If there is no stored index, what is the best way to create one that you can use scope.


Well, creating an index and using a filter (once) will take about the same amount of time because you have to read the entire database either way. Actually, when creating an index you have to not only read the entire database, you also have to write the field to the index for each record too.

Are you using a temporary dbf? Or, explain more about what you need to do. Is there a reason you can't have an existing index?

Below are the results of a speed test I did some time back.

- 1,000,000 record database

- 20,543 records match criteria (state="CA")

- Time for filter 23.13 seconds

- Time for scope 0.32 seconds

Thus filtering took 23.13 / 0.32 = 72 times longer than a scope.

And the winner is, scopes!
FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
Posts: 2706
Joined: Fri Oct 07, 2005 01:50 PM
Re: dbfntx very slow with 2+ users
Posted: Sat Apr 09, 2022 02:02 PM

Gentleman ... you all may be overlooking your network infrastructure .. especially if you are doing peer to peer. Check your router and switches .. if they are old .. replace them .. I noticed a BIG improvement in our peer to peer application when we upgraded our ISP router with a dual band 2g\5g ( with built in wireless ) .. I have a 5g wireless in my laptop and when I connect to the 5g side of the new router .. it made a BIG difference.

Rick Lipkin

Posts: 1091
Joined: Thu Nov 17, 2005 11:08 AM
Re: dbfntx very slow with 2+ users
Posted: Sun Apr 10, 2022 08:14 AM

in my workplace I use two different pc
my personal dell vostro 16 GB i7 SDD and a fujitsu i5 8 GB and HD

microsoft windows server virtalualized (vmware)

If I perform lanspeedtest.exe the speed is very fast and similar

But if I work with my program in dell is very very fast while in fujitsu the speed some operations are slow, others are faster.
I use dbfcdx

it almost seems that processor speed is essential for data access and not just network speed
which in my opinion shouldn't be that influential
The question is When I execute
SELECT 0
USE n:\hse\customers // very fast
SET INDEX TO n:\hse\customers // not so fast

The index is open and read in its entirety?
And then loaded into the memory?

Marco Boschi
info@marcoboschi.it
Posts: 6983
Joined: Fri Oct 07, 2005 07:07 PM
Re: dbfntx very slow with 2+ users
Posted: Sun Apr 10, 2022 04:39 PM

Marco,

SSD is the point for DBF speed.
Why don't you use RDP?
This way you have a local system.

Best regards,
Otto

Posts: 1772
Joined: Thu Sep 05, 2019 05:32 AM
Re: dbfntx very slow with 2+ users
Posted: Mon Apr 11, 2022 12:04 AM
hi,

if you need more than 3 Second, even over Network, it is "too long"

SET FILTER is slow when not use SCOPE before ... it is like SQL without LIMIT

---

SCOPE need Index and SCOPETOP / SCOPEBOTTOM begin on left Side

if you have a FILTER to search "in String" like
Code (fw): Select all Collapse
   "ABC" $ CUSTOMER->NAME

you can Speed-Up when use Index and OrdWildSeek()
Code (fw): Select all Collapse
   ORDSETFOCUS( "ALLETELNO" )
   GO TOP
   DO WHILE ORDWILDSEEK( "*" + ALLTRIM( cSeek ) + "*", .T. ) // harbour have 2nd Parameter
      cTEXT := XPPTEL->NAME1 
      AADD( aPhone, { cTEXT, RECNO() } )
   ENDDO


---

"File-Based" System need SMB, else you can not "share" a File

"Drive Letter" use LanManager which can "redirect" Port 139 to 445
SMB2 is using UNC-Path and you do not need "Authentification" every Time

so avoid Traffic on UDP Ports 135-139 which use "old" SMB1 (with all those Problems)

p.s. on many SQL Server UDP-Ports are "blocked" by Admin for "Security"
greeting,

Jimmy
Posts: 1091
Joined: Thu Nov 17, 2005 11:08 AM
Re: dbfntx very slow with 2+ users
Posted: Mon Apr 11, 2022 09:24 AM

Otto,
my local volume C: is SSD
but dbf tables are in a server volume

Marco Boschi
info@marcoboschi.it
Posts: 6983
Joined: Fri Oct 07, 2005 07:07 PM
Re: dbfntx very slow with 2+ users
Posted: Mon Apr 11, 2022 12:09 PM

Hallo Marco,
Is your program a hobby application or is it in for professional use?

If it is for professional use, then I suggest you buy a SSD for your server and then run your program remotely.

Then you will have a professional system. How many users do you have?
File sharing and the fact that your data is also on the client is also a big security issue.

You have to install the appropriate GPO to prevent a remote client from doing certain things, but then you have a real system for professional use.
And you also are prepared for development into a web app.

With best regards,
Otto

Posts: 1091
Joined: Thu Nov 17, 2005 11:08 AM
Re: dbfntx very slow with 2+ users
Posted: Mon Apr 11, 2022 01:51 PM

Dear Otto
>Is your program a hobby application or is it in for professional use?
professional use

> If it is for professional use, then I suggest you buy a SSD for your server and then run your program remotely.
soon we will change the server my program run on a mapped volume

> Then you will have a professional system. How many users do you have?
~ 20

> File sharing and the fact that your data is also on the client is also a big security issue.
Yes I Know

it would be nice if there was a product like APOLLO that allows me not to change anything (the dbf tables)
in my program my users are used to working in this way and it would be practical to change they work with eyes closed

Marco Boschi
info@marcoboschi.it
Posts: 6983
Joined: Fri Oct 07, 2005 07:07 PM
Re: dbfntx very slow with 2+ users
Posted: Mon Apr 11, 2022 05:00 PM

Marco, you can use your program as it is, just remotely.
So many problems disappear with it.
No installation on the client PCs.
Data backup in one central place.
No mapped drives.
Client can be a smartphone, a tablet, a Mac or AndroidPC or all Windows versions.
Plan a weekend in the Dolomites and I will show you how we do it.

With best regards,
Otto

Posts: 1487
Joined: Tue Jun 14, 2016 07:51 AM
Re: dbfntx very slow with 2+ users
Posted: Mon Apr 11, 2022 06:15 PM
Otto wrote:Marco, you can use your program as it is, just remotely.
So many problems disappear with it.
No installation on the client PCs.
Data backup in one central place.
No mapped drives.
Client can be a smartphone, a tablet, a Mac or AndroidPC or all Windows versions.
Plan a weekend in the Dolomites and I will show you how we do it.


With best regards,
Otto


Are there youtube files how it is done ? Or documentation ?
We have talked about it before, but still ... not operational
Marc Venken

Using: FWH 23.08 with Harbour
Posts: 6983
Joined: Fri Oct 07, 2005 07:07 PM
Re: dbfntx very slow with 2+ users
Posted: Mon Apr 11, 2022 08:24 PM

Hello Marc,
I can offer you the same as Marco.
Spend a weekend in Tirol and I show you our system and my mod harbour programs.
Best regards,
Otto