How can I speed up a script connecting to the DB?

Salut, guys, tell me is it possible to rewrite the script better if it a bit prettier.
I watched the execution speed of the script via
$start = microtime(true);
echo (microtime(true) - $start).' seconds.';

And found that 75% of the time eats this piece of code
$db = new Database('localhost','devbase','developer','pass');

An example of a constructor and one method responsible for the removal
class Database {
 private $host;
 private $dbName;
 private $user;
 private $pass;
 private $DBH;

 function __construct($host,$dbname,$user,$pass) {
 $this->host = $host;
 $this->dbname = $dbname;
 $this->user = $user;
 $this->pass = $pass;
 $this->DBH = new PDO("mysql:host=$this->host;dbname=$this->dbname",$this->user,$this->pass);

 function delete($tableName, $conditions, $priority = ") {

 $query = $this->DBH->prepare("DELETE $priority FROM $tableName WHERE $conditions");
 return $result = $query->execute();

 $query = null;
 $this->DBH = null;

What is the current logic:
1. When a page request is always created this object because there is always a request to the database
2. Later in the script 1 or more times there is a query like $db->select('phone address','clients WHERE id=5567');
3. In General, this is the part where even a dozen times this way there is a DB query on the output is about 25% of the time the script along with the rest of the logic of rendering.

At the moment, the app works less than 10 people, in the future, the number of simultaneously operating people will be several hundred.
The specificity of the work is such that sometimes you want to open with a couple dozen pages, and if it is done by several people simultaneously, you have to wait 10-15s until it opened and rendered.
In General, is not comme Il faut, and it would be cool again for a few tens of percent to increase the speed of the script.

Time spent on making this object around 0.24 sec. when the total time for the page output 0.3 sec. In scales of 1 person extreme savings, in the scale of hundreds already there.
July 2nd 19 at 17:52
3 answers
July 2nd 19 at 17:54
Try changing localhost to as the connection first tries to resolvethe name.
Here localhost is just an example, actually there is a real IP of the remote DB - oscar.Abernathy32 commented on July 2nd 19 at 17:57
Thanks, I helped for example with 1 sec to max. 30 MS accelerated. Windows 10, Denwer. - michale.Collin commented on July 2nd 19 at 18:00
: mark Paul's answer as a solution, you at least helped. In my case, no. Alexander, and you're sure to 0.03 with decreased connection time to the database, and not 0.3 C? I check it on the remote server, actually on the working machine where the production server. Personally, I came to the conclusion that much faster speed up not get a DB connection, because most of the time is spent on overcoming the distance to the remote server and back. - oscar.Abernathy32 commented on July 2nd 19 at 18:03
: Yes, I watched it on time in the debugger of Chrome. Even up to 10-20 MS. But it's on my local server Denwer. Deystvitelno now and other processes connected to the database and was writing something in her, now instant!
Wanted this is and hosting to implement, but support said that only localhost can and all any addresses, sorry. - michale.Collin commented on July 2nd 19 at 18:06
July 2nd 19 at 17:56
You create a connection to the database server on the local machine 240мс this is not normal.
Something wrong with the server perhaps?
Try to change localhost to - oscar.Abernathy32 commented on July 2nd 19 at 17:59
: The database is stored on Itske - michale.Collin commented on July 2nd 19 at 18:02
July 2nd 19 at 17:58
What OS check ? What database ? What version of php ?
If on windows, all the rules - in windows connect php to the database is slow. Linux will be faster.
Yuzayu openServer
php - php7
Windows on LAN / on Itske, where dB is the Debian latest (8 like)
Database - MySQL
Hosting (if important). - oscar.Abernathy32 commented on July 2nd 19 at 18:01

Find more questions by tags OOPDebuggingDatabasesPHPPHP PDO