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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T17:41:27+00:00 2026-06-17T17:41:27+00:00

I have a rather simple query that for some reason is not using any

  • 0

I have a rather simple query that for some reason is not using any index:

CREATE TABLE `events_self` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`date` int(10) unsigned NOT NULL,
`username` varchar(16) CHARACTER SET latin1 COLLATE latin1_general_ci NOT NULL,
`event` enum('status_update','follow_hashtag','make_hashtag','avatar','placeholder_3') CHARACTER SET latin1 COLLATE latin1_general_ci NOT NULL,
`obj_id` varchar(140) CHARACTER SET latin1 COLLATE latin1_general_ci NOT NULL,
`inline` varchar(255) CHARACTER SET latin1 COLLATE latin1_general_ci NOT NULL,
PRIMARY KEY (`id`,`date`),
KEY `obj_id` (`obj_id`),
KEY `user_date` (`username`,`date`),
KEY `event` (`event`),
KEY `x` (`event`,`inline`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;


INSERT INTO `events_self` (`id`, `date`, `username`, `event`, `obj_id`, `inline`) VALUES (1, 1358359266, 'aaa', 'make_hashtag', '1', 'scene');

SELECT inline FROM events_self  WHERE obj_id = 1;

EXPLAIN SELECT inline FROM events_self  WHERE obj_id = 1;


+----+-------------+-------------+------+---------------+------+---------+------+---------+-------------+
| id | select_type | table       | type | possible_keys | key  | key_len | ref  | rows    | Extra       |
+----+-------------+-------------+------+---------------+------+---------+------+---------+-------------+
|  1 | SIMPLE      | events_self | ALL  | obj_id        | NULL | NULL    | NULL | 1610702 | Using where |
+----+-------------+-------------+------+---------------+------+---------+------+---------+-------------+
1 row in set (0.00 sec)

Server version: 5.3.2-MariaDB-beta-mariadb102~lenny-log (MariaDB – http://mariadb.com/)

Should I leave the table / query as is or it would be best to force the use of an index?

  • 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-17T17:41:28+00:00Added an answer on June 17, 2026 at 5:41 pm

    try this

    EXPLAIN SELECT inline FROM events_self  WHERE obj_id = "1";
    

    Since you sent the integer, MySql will not consider the indexing as type is different.

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

Sidebar

Related Questions

I have a very simple SQL query that I made which retrieves some user
I have following rather simple query select count(*) from tbl t1, tbl t2 For
I have a rather simple question that I could normally debug myself, but I
I have some rather odd behavior in my D program that I've narrowed down
In my Hibernated system, I have a class Picture that has some simple data,
Its a simple login form that I have made using Classic ASP, where the
I have this rather simple SQL query, but it takes almost a minute to
I have a simple table stock_ledger_id INT(10) (Primary) piece_to_bin_id INT(10) quantity INT(11) create_datetime TIMESTAMP
Have a rather simple question. Does anyone knows if i can use jparallax both
I have a rather simple ListView row: <?xml version=1.0 encoding=utf-8?> <RelativeLayout xmlns:android=http://schemas.android.com/apk/res/android android:layout_width=fill_parent android:layout_height=wrap_content

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.