Databases via Network

Everything else that doesn't fall into one of the other PB categories.
Marco2007
Enthusiast
Enthusiast
Posts: 648
Joined: Tue Jun 12, 2007 10:30 am
Location: not there...

Databases via Network

Post by Marco2007 »

Hi,

My apps run very fast at work. Apps and Dbs are stored on the network.
But when I connect from home via Internet it`s really brutally slow.
Is it just the Internet speed or a design issue?

Any ideas, what the best way could be? The best way of storing and reading data via Internet?

br and thx
PureBasic for Windows
User avatar
Bisonte
Addict
Addict
Posts: 1336
Joined: Tue Oct 09, 2007 2:15 am

Re: Databases via Network

Post by Bisonte »

there are so many factors...

Firewall, Antivirus, INet-Speed, INet-Usage, What kind of database, how you access it and so on...
All these can slow down internet activities...
So I think, we need a piece of your source, to figure out ....
PureBasic 6.21 (Windows x64) | Windows 11 Pro | AsRock B850 Steel Legend Wifi | R7 9800x3D | 64GB RAM | RTX 5080 | ThermaltakeView 270 TG ARGB | build by vannicom​​
English is not my native language... (I often use DeepL.)
Marco2007
Enthusiast
Enthusiast
Posts: 648
Joined: Tue Jun 12, 2007 10:30 am
Location: not there...

Re: Databases via Network

Post by Marco2007 »

Database: MS Access and sqlite.

Just ordinary queries. Nothing Special.
I will try some different stuff...
PureBasic for Windows
Zach
Addict
Addict
Posts: 1678
Joined: Sun Dec 12, 2010 12:36 am
Location: Somewhere in the midwest
Contact:

Re: Databases via Network

Post by Zach »

Are you connecting through a VPN?

That will be the number one killer of speed, especially if it is encrypted
Marco2007
Enthusiast
Enthusiast
Posts: 648
Joined: Tue Jun 12, 2007 10:30 am
Location: not there...

Re: Databases via Network

Post by Marco2007 »

Yep, VPN encrypted..is that the horror?
PureBasic for Windows
Zach
Addict
Addict
Posts: 1678
Joined: Sun Dec 12, 2010 12:36 am
Location: Somewhere in the midwest
Contact:

Re: Databases via Network

Post by Zach »

More than likely.

At the very least, it will increase your latency. But encrypted net connections also take quite a bit of CPU, and that is why you don't really see very high speed VPNs for public use yet. I've actually been wondering if getting a dedicated hardware accelerated NIC would actually help my connection in that regard, as I more often than not browse the web and download /upload through OpenVPN @ 256-bit encryption. I can usually pull around 3MB/s Down, but my ping goes up 3x its normal amount.

I usually have to turn the VPN off if I want to play an online game, etc.

My mom works for HP (was EDS until HP bought them) and does database work through VPN at home. Always bitches about her connection taking forever :lol:
jesperbrannmark
Enthusiast
Enthusiast
Posts: 536
Joined: Mon Feb 16, 2009 10:42 am
Location: sweden
Contact:

Re: Databases via Network

Post by jesperbrannmark »

Check what ping you have. I have seen some VPN connections with 1000ms and more. Thats no fun. Also make sure the server is doing the server side stuff. Some databases will access the file instead of just grabbing the piece of data you need.
Another idea is to use your home computer to remote desktop your work computer as well. I dont that few times when internet has been poor quality (loosing packages, dropping connections etc) - just remote desktop a computer somewhere that has a good connection that runs the client program and connect to the server. So even if i loose my connection nothing is lost.
jesperbrannmark
Enthusiast
Enthusiast
Posts: 536
Joined: Mon Feb 16, 2009 10:42 am
Location: sweden
Contact:

Re: Databases via Network

Post by jesperbrannmark »

Wait here one second. I think you just said the problem:
Microsoft Access and SQLite.

Both being file allocated not doing stuff server side but basicly downloading the file to client side and send tons of shit inbetween.

Search in the forum, I know about 6 months back someone worked on doing SQLite to a true server-client solution here using PB. Thats your solution (and get rid of the microsoft stuff... 8) )
User avatar
Kukulkan
Addict
Addict
Posts: 1422
Joined: Mon Jun 06, 2005 2:35 pm
Location: germany
Contact:

Re: Databases via Network

Post by Kukulkan »

Access and SQLite are both not designed for networking access (like jesperbrannmark allready said). You can use them only on a file-access basis - and this produces a lot of overhead.

If you like to access a database using a network (both local and through internet) you need to use a network capable database like MySQL, MariaDB, PostgreSQL, MS-SQL-Server, Oracle, Caché etc. (there are many others). They allow you to manage concurrent access of multiple clients and reduce the network traffic to the results only (even if the database has millions of entries).

Kukulkan
Post Reply