dbfntx very slow with 2+ users

User avatar
MarcoBoschi
Posts: 1072
Joined: Thu Nov 17, 2005 11:08 am
Location: Padova - Italy
Contact:

Re: dbfntx very slow with 2+ users

Post by MarcoBoschi »

[quote="don lowenstein"]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
User avatar
MarcoBoschi
Posts: 1072
Joined: Thu Nov 17, 2005 11:08 am
Location: Padova - Italy
Contact:

Re: dbfntx very slow with 2+ users

Post by MarcoBoschi »

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
User avatar
James Bott
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA
Contact:

Re: dbfntx very slow with 2+ users

Post by James Bott »

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
User avatar
Otto
Posts: 6414
Joined: Fri Oct 07, 2005 7:07 pm
Has thanked: 30 times
Been thanked: 2 times
Contact:

Re: dbfntx very slow with 2+ users

Post by Otto »

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
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
James Bott
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA
Contact:

Re: dbfntx very slow with 2+ users

Post by James Bott »

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
User avatar
Rick Lipkin
Posts: 2675
Joined: Fri Oct 07, 2005 1:50 pm
Location: Columbia, South Carolina USA

Re: dbfntx very slow with 2+ users

Post by Rick Lipkin »

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
User avatar
MarcoBoschi
Posts: 1072
Joined: Thu Nov 17, 2005 11:08 am
Location: Padova - Italy
Contact:

Re: dbfntx very slow with 2+ users

Post by MarcoBoschi »

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
User avatar
Otto
Posts: 6414
Joined: Fri Oct 07, 2005 7:07 pm
Has thanked: 30 times
Been thanked: 2 times
Contact:

Re: dbfntx very slow with 2+ users

Post by Otto »

Marco,

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

Best regards,
Otto
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
Jimmy
Posts: 1740
Joined: Thu Sep 05, 2019 5:32 am
Location: Hamburg, Germany
Has thanked: 2 times

Re: dbfntx very slow with 2+ users

Post by Jimmy »

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: Select all | Expand

  "ABC" $ CUSTOMER->NAME

you can Speed-Up when use Index and OrdWildSeek()

Code: Select all | Expand

  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
User avatar
MarcoBoschi
Posts: 1072
Joined: Thu Nov 17, 2005 11:08 am
Location: Padova - Italy
Contact:

Re: dbfntx very slow with 2+ users

Post by MarcoBoschi »

Otto,
my local volume C: is SSD
but dbf tables are in a server volume
Marco Boschi
info@marcoboschi.it
User avatar
Otto
Posts: 6414
Joined: Fri Oct 07, 2005 7:07 pm
Has thanked: 30 times
Been thanked: 2 times
Contact:

Re: dbfntx very slow with 2+ users

Post by Otto »

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
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
MarcoBoschi
Posts: 1072
Joined: Thu Nov 17, 2005 11:08 am
Location: Padova - Italy
Contact:

Re: dbfntx very slow with 2+ users

Post by MarcoBoschi »

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
User avatar
Otto
Posts: 6414
Joined: Fri Oct 07, 2005 7:07 pm
Has thanked: 30 times
Been thanked: 2 times
Contact:

Re: dbfntx very slow with 2+ users

Post by Otto »

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
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
Marc Venken
Posts: 1485
Joined: Tue Jun 14, 2016 7:51 am
Location: Belgium

Re: dbfntx very slow with 2+ users

Post by Marc Venken »

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
User avatar
Otto
Posts: 6414
Joined: Fri Oct 07, 2005 7:07 pm
Has thanked: 30 times
Been thanked: 2 times
Contact:

Re: dbfntx very slow with 2+ users

Post by Otto »

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
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
Post Reply