Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4337538
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T10:57:29+00:00 2026-05-21T10:57:29+00:00

Here is my setup: Windows Server 2008 R2 MySql 5.1.562 Php 5.3.2 Doctrine 1.2

  • 0

Here is my setup:
Windows Server 2008 R2
MySql 5.1.562
Php 5.3.2
Doctrine 1.2

Anybody have an Idea why my query is taking about one second to perform a simple query.

echo date("Y-m-d H:i:s", time()) ."::::::" . microtime(true)."<br />";

             $q = Doctrine_Query::create()
            ->from("Ordering")
            ->where("client_id = ?",array($_SESSION["UserID"]));

            $ResProduct = $q->execute();

echo date("Y-m-d H:i:s", time()) ."::::::" . microtime(true)."<br />";  

Here is the result of the 2 echo to show you how long it’s take to perform the query.

2011-04-21 01:48:24::::::1303364904.8051
2011-04-21 01:48:25::::::1303364905.8418

An other thing, there is no data in the database.

Edit
I Perform the query directly in the mysql console and get the result very quickly

mysql> select * from Ordering where client_id = 2;
+----+------------+-------+------+-----------+
| id | product_id | price | qty  | client_id |
+----+------------+-------+------+-----------+
|  7 |          1 |  0.89 |   20 |         2 |
+----+------------+-------+------+-----------+
1 row in set  (0.00 sec)
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-21T10:57:30+00:00Added an answer on May 21, 2026 at 10:57 am
    • Use microtime(true) instead of microtime_float()
    • Configure MySQL not to resolve IP’s of connecting clients: http://dev.mysql.com/doc/refman/5.0/en/server-options.html#option_mysqld_skip-name-resolve
    • client_id = ?– why do you cast $_SESSION["UserID"] to array? I think this is unnecessary.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Here is my setup: Dev: - Windows Server 2008 64-bit - Visual Studio 2008
I have a timeclock database setup on a Windows 2008 server, SQL Server. It
We have set up a Windows 2008 server with MS SQL 2005 (default instance),
I was wondering how many people here use Windows Server 2008 (or w2k3) as
We have a setup here that is less than ideal, We have our webserver
Here is my setup. In my application delegate, I have a property called currentFoo.
Here's the setup I have in a vs2008 solution: Data layer in a project
Just a small SVN problem here. I setup my own SVN server Setting up
Ok, here is my dilemma I have a database set up with about 5
Here tis the error I get while trying to install MySQL-python-1.2.3. any idea's? Traceback

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.