PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Autres forums > Forum Programmation & Conception > comp.databases.mysql > Slow connections
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
Slow connections

Réponse
 
LinkBack Outils de la discussion
Vieux 17/09/2007, 14h39   #1
UKuser
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Slow connections

Hi,

I am using PHP and MySQL and sqlYog for my db browser. I have no
problems connecting to my db through sqlYog and its almost
instantaneous, however when using this simple php code:

$db = mysql_connect('localhost','public','xxpwxx');
print "$db";

my connection takes about 2.5 seconds (i know that because I'm waiting
that long for an ajax connection on a page using the specific
database). However when I load it to my webhosting (Linux/ Appache)
the same code is instantaneous as well. If I connect to my webhosting
by replacing localhost with their IP it too takes about 2.5 seconds.

I'm running Windows XP SP2 with MySQL 5 and PHP 5.

Any thoughts/ on just improving the connection speed would be
great.

Many thanks

A

  Réponse avec citation
Vieux 17/09/2007, 15h40   #2
Peter H. Coffin
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Slow connections

On Mon, 17 Sep 2007 06:39:37 -0700, UKuser wrote:
> Hi,
>
> I am using PHP and MySQL and sqlYog for my db browser. I have no
> problems connecting to my db through sqlYog and its almost
> instantaneous, however when using this simple php code:
>
> $db = mysql_connect('localhost','public','xxpwxx');
> print "$db";
>
> my connection takes about 2.5 seconds (i know that because I'm waiting
> that long for an ajax connection on a page using the specific
> database). However when I load it to my webhosting (Linux/ Appache)
> the same code is instantaneous as well. If I connect to my webhosting
> by replacing localhost with their IP it too takes about 2.5 seconds.
>
> I'm running Windows XP SP2 with MySQL 5 and PHP 5.
>
> Any thoughts/ on just improving the connection speed would be
> great.


DNS delay, perhaps?

--
6. I will not gloat over my enemies' predicament before killing them.
--Peter Anspach's list of things to do as an Evil Overlord
  Réponse avec citation
Vieux 17/09/2007, 16h44   #3
UKuser
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Slow connections

On 17 Sep, 15:40, "Peter H. Coffin" <hell...@ninehells.com> wrote:
> On Mon, 17 Sep 2007 06:39:37 -0700, UKuser wrote:
> > Hi,

>
> > I am using PHP and MySQL and sqlYog for my db browser. I have no
> > problems connecting to my db through sqlYog and its almost
> > instantaneous, however when using this simple php code:

>
> > $db = mysql_connect('localhost','public','xxpwxx');
> > print "$db";

>
> > my connection takes about 2.5 seconds (i know that because I'm waiting
> > that long for an ajax connection on a page using the specific
> > database). However when I load it to my webhosting (Linux/ Appache)
> > the same code is instantaneous as well. If I connect to my webhosting
> > by replacing localhost with their IP it too takes about 2.5 seconds.

>
> > I'm running Windows XP SP2 with MySQL 5 and PHP 5.

>
> > Any thoughts/ on just improving the connection speed would be
> > great.

>
> DNS delay, perhaps?
>
> --
> 6. I will not gloat over my enemies' predicament before killing them.
> --Peter Anspach's list of things to do as an Evil Overlord


Unfortunately if I replace it with 127.0.0.1 it is still the same time
delay.

  Réponse avec citation
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 21h16.


Édité par : vBulletin® version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières ©2000-2008
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,27837 seconds with 11 queries