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 474323
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T00:16:33+00:00 2026-05-13T00:16:33+00:00

I am running the following MySQL query : select * from combinations where family_type=’f597′;

  • 0

I am running the following MySQL query:

select * from combinations where family_type='f597';

On a table that has about 90,000 lines. If I run the query via phpMyAdmin, it takes 0.3 seconds to run, but in my PHP page on the same host it consistently takes about 8 seconds.

To test the amount of time it takes in my page, I run it like this:

$secs = microtime(true);
$q = "select * from combinations where family_type='f597';";
$r = mysql_query($q);
$secs = round(microtime(true)-$secs, 3);
exit("$secs seconds");

The table structure is as follows:

CREATE TABLE `combinations` (
  `part_no` char(7) collate latin1_general_ci NOT NULL,
  `key_type` smallint(4) unsigned NOT NULL,
  `family_type` char(5) collate latin1_general_ci NOT NULL,
  `year_start` varchar(6) collate latin1_general_ci NOT NULL,
  `year_end` varchar(6) collate latin1_general_ci NOT NULL,
  `visual` varchar(31) collate latin1_general_ci NOT NULL ,
  `info_veh_0` varchar(255) collate latin1_general_ci NOT NULL,
  `info_veh_1` varchar(255) collate latin1_general_ci NOT NULL,
  `info_veh_2` varchar(255) collate latin1_general_ci NOT NULL,
  `key` mediumint(8) unsigned NOT NULL auto_increment,
  PRIMARY KEY  (`key`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci AUTO_INCREMENT=2349584 ;

Can anyone explain why my program runs the same query so much slower than phpMyAdmin?

[update 1] I tested the query outside of any other programming — I created a simple test.php page that contained only the mysql connect info and the query in question. So a priori it’s not some other aspect of the site programming that’s causing the delay.

[update 2] The actual time that it takes to load the page is the same for phpMyAdmin and for my test page. The difference may be due to the way that phpMyAdmin calculates the query time.

In any case, if the query takes only 0.3 seconds to process, where does the rest of the delay come from?

  • 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-13T00:16:34+00:00Added an answer on May 13, 2026 at 12:16 am

    This could be because phpMyAdmin adds a limit clause behind the screen due to the fact that it’s paginating the results.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm running the following MySQL query in PHP. SELECT * FROM `challenges`,`verifications` WHERE (`challenges`.`user_id`='.$this->record['id'].'
I have the following query running against a mysql database: select value from fact_data
After running the following SQL statements, you will see that, MySQL has automatically created
I am running following query. SELECT T1.C1, T2.C2..., IF( T1.C1<>T2.C1,Changed,1) AS NewColumn From T1
I am running following query.. Select T1.* from T1 LEFT JOIN T2 ON T1.C1
I have the following sample query (MySQL): SELECT * FROM `action` WHERE `customer_id` IN
I'm running the following query in MYSQL select distinct straight_join cu.entryid entryid, t0.tokpos starting_position,
I've got a MySQL query somewhat like the following: SELECT * FROM products LEFT
If I run the following query: select * from mysql.user order by abcdef; MySQL
I am running the following query : SELECT @newNo := MAX( category_code ) FROM

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.