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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T12:05:54+00:00 2026-06-14T12:05:54+00:00

I tried the SQL code: explain SELECT * FROM myTable LIMIT 1 As a

  • 0

I tried the SQL code:

explain SELECT * FROM myTable LIMIT 1

As a result I got:

id select_type table   type possible_keys key  key_len ref  **rows**
1  SIMPLE      myTable ALL  NULL          NULL NULL    NULL **32117**

Do you know why the query would run though all rows instead of simply picking the first row?
What can I change within the query (or in my table) to reduce the line amount for a similar result?

  • 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-06-14T12:05:55+00:00Added an answer on June 14, 2026 at 12:05 pm

    The rows count shown is only an estimate of the number of rows to examine. It is not always equal to the actual number of rows examined when you run the query.

    In particular:

    LIMIT is not taken into account while estimating number of rows Even if you have LIMIT which restricts how many rows will be examined MySQL will still print full number.

    Source

    When the query actually runs only one row will be examined.

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

Sidebar

Related Questions

I'm trying to drop a SQL Server database from .NET code. I've tried using
i have this SQL code : $sql=SELECT * FROM functions WHERE user_name='ben ' AND
here's my sample sql code SELECT * FROM wsrecruitcvhead AS CV, wsrecruittimes AS WT
This is my SQL code SELECT p.plant_name, sum(data.value_1) totalvalue_1 FROM (SELECT DISTINCT date_format(date, '%Y-%m')
i've got a simple linq to sql object. I grab it from the database
I have the following sql code: $statement = `maildb`; $query = SELECT COUNT(*) as
I have the following SQL code; SELECT a.*, b.maxDate as last_payment_date, c.package as payment_for_package,
I'm trying to do the equivalent of this SQL Code SELECT ID SUM(CASE WHEN
I tried to install sql server 2005.After the installation i want to open sql
I tried to make a dynamic SQL which gets all tasks for some users

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.