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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T14:07:37+00:00 2026-05-28T14:07:37+00:00

if we have table such: create table x( id int primary key, something_else_1 int,

  • 0

if we have table such:

create table x(
   id int primary key,
   something_else_1 int,
   something_else_2 int,
   something_else_3 int,

   char_data text, -- or varchar(1000)
);

this table will be queried on all fields except char_data.

most queries will be similar to:

select id, something_else_1
from x
where something_else_2 = 2 and something_else_3 = 5;

question is – if we have indexes etc,

what configuration will be better – text or varchar.

Just one final note –

I know I can separate this into two tables, buy separation in this case will be not the best idea, since all fields except the blob’s will be something like unique index or similar.

  • 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-28T14:07:38+00:00Added an answer on May 28, 2026 at 2:07 pm

    this table will be queried on all fields except char_data.

    Then data type of char_data has no influence over performance. Only if you select char_data it’ll consume more bandwidth. Nothing else.

    Its not a problem. Because you are not using in your sql. SELECT * will become slow but SELECT id, something_else_1 will not make it slow. WHERE id=2 and something_else_2=1 has no effect, but WHERE char_data like '%charsequence%'. As long as you are not searching your table with char_data you are safe.
    Besides if you still want to search by char_data, you should enable full text search.

    ALTER TABLE `x` ADD FULLTEXT(`char_data`); 
    

    Note: Full text search is only supported in MyISAM table engine.

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

Sidebar

Related Questions

say I have text such as CREATE TABLE blah blah ( `id` int not
I have a table that looks like this CREATE TABLE `purchases` ( `id` INT(10)
I have some table with such schema (simplified): CREATE TABLE folders( id INT(11) UNSIGNED
Suppose I have a system where I have metadata such as: table: ====== key
Assuming you have the following database table: create table Names ( Id INT IDENTITY
I have a table of player performance: CREATE TABLE TopTen ( id INT UNSIGNED
I have a members table in MySQL CREATE TABLE `members` ( `id` int(10) unsigned
I have a MySQL table consisting of: CREATE TABLE `url_list` ( `id` int(10) unsigned
I have a simple table as below. CREATE TABLE `stats` ( `id` int(11) NOT
I have this code to create new sql table when i execute this its

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.