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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T21:13:22+00:00 2026-05-20T21:13:22+00:00

I am running a very simple query on an indexed column in a 20

  • 0

I am running a very simple query on an indexed column in a 20 mln row table.

select * from prvol where date = '20100203';

It takes about 22 seconds. I am new to sql, but think that an indexed column should be faster than this. There is no memory issue. Also, the output says the time is mostly in network. I’m running the query on the same machine the server is on.

/* 0 rows affected, 6,882 rows found. Duration for 1 query: 0.828 sec. (+ 21.438 sec. network) */

What does that network time mean? Would you expect this query to run faster?

EDIT: as requested, here is some output.

EXPLAIN SELECT * FROM prvol WHERE date = '20100203';
"id","select_type","table","type","possible_keys","key","key_len","ref","rows","Extra"
"1","SIMPLE","prvol","ref","Index 1","Index 1","4","const","6881","Using where"

SHOW CREATE TABLE prvol;
"Table","Create Table"
"prvol","CREATE TABLE `prvol` (
  `exch` varchar(10) DEFAULT NULL,
  `ticker` varchar(10) DEFAULT NULL,
  `date` date DEFAULT NULL,
  `open` float unsigned DEFAULT NULL,
  `high` float unsigned DEFAULT NULL,
  `low` float unsigned DEFAULT NULL,
  `close` float unsigned DEFAULT NULL,
  `vs` float unsigned DEFAULT NULL,
  `aclose` float DEFAULT NULL,
  KEY `Index 1` (`date`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1"
  • 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-20T21:13:22+00:00Added an answer on May 20, 2026 at 9:13 pm

    I eventually figured out why my query was slow. See here for answer. It ended up having nothing to do with network time. It was a cache size issue.

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

Sidebar

Related Questions

I have very simple query like this: SELECT * FROM `all_conversations` WHERE `deleted_1` !=
When running a very simple query in SQL Server 2000. SELECT getDate() Most queries
I have a very simple INSERT statement being executed from a PHP script running
I am running a really simple query on a really small table (<10 rows,
I have a very simple query (three where conditions; two equals, one between) from
I have a very simple test program, running on Solaris 5.8: #include <stdio.h> #include
Found very strange behavior of MS Access database when running queries from c#. It
i have a very simple server running WAMP on a windows machine, with a
I am writing a very simple query, but I am getting duplicate values for
I have a SQL query that takes a very long time to run on

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.