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

  • SEARCH
  • Home
  • 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 7572925
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T16:03:14+00:00 2026-05-30T16:03:14+00:00

I have table: CREATE TABLE IF NOT EXISTS `TxtDila` ( `ID` int(11) NOT NULL

  • 0

I have table:

CREATE TABLE IF NOT EXISTS `TxtDila` (
  `ID` int(11) NOT NULL AUTO_INCREMENT,
...
  `Datum` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
...
  PRIMARY KEY (`ID`),
  KEY `Datum` (`Datum`),
...
  FULLTEXT KEY `Titulek` (`Titulek`,`Anotace`,`Txt`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=1;

When I ran:
EXPLAIN SELECT ID FROM TxtDila USE INDEX ( Datum ) ORDER BY Datum

I get:

id  select_type table   type    possible_keys   key key_len ref rows    Extra
1   SIMPLE  TxtDila ALL NULL    NULL    NULL    NULL    214603  Using filesort

Even when I try
EXPLAIN SELECT ID FROM TxtDila use index(Datum) USE INDEX ( Datum ) ORDER BY Datum
I can see filesort.

Table has 200.000 records, and about 700MB. I have fulltext index.

Can anyone help me?
Thank you

  • 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-30T16:03:15+00:00Added an answer on May 30, 2026 at 4:03 pm

    You are trying to read 200,000 records’ ID fields (the entire table). The index Datum doesn’t include the ID fields, so whichever way you do it this is going to involve reading the ID fields from disc. You’re telling MySQL to use the index on Datum to order the records, then read them. That pretty much means doing up to 200,000 reads from the disc. MySQL decides (correctly) that it’s less work just to read all the (ID, datum) pairs from the table in one big read and order them in memory.

    I suggest making the Datum index a multi-column index on (Datum, ID).

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

Sidebar

Related Questions

I have this table: CREATE TABLE `test` ( `ID` int(11) NOT NULL auto_increment, `text`
I have this table: CREATE TABLE `point` ( `id` INT(11) NOT NULL AUTO_INCREMENT, `siteid`
I have this table CREATE TABLE `codes` ( `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
I have sqlite table CREATE TABLE IF NOT EXISTS [app_status]( [id] INTEGER PRIMARY KEY
i have 2 tables CREATE TABLE if not exists tag_name( + tagid INTEGER PRIMARY
I have the following table structure CREATE TABLE `table` ( `id` int(11) NOT NULL
I have Created a table like CREATE TABLE [dbo].[tab1]( [Id] [int] NOT NULL, [Name]
I have a sql server table: CREATE TABLE [Workflow].[MilestoneDate]( [MilestoneDateId] [int] IDENTITY(1,1) NOT NULL,
I have this table CREATE TABLE IF NOT EXISTS `links` ( `link_id` int(20) NOT
I have this Tags table CREATE TABLE IF NOT EXISTS `Tags` ( `id_tag` int(10)

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.