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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T02:34:55+00:00 2026-06-15T02:34:55+00:00

Is doing an exact match filter based on a text column conceptually slower than

  • 0

Is doing an exact match filter based on a text column conceptually slower than grabbing a set of rows based on a key and filtering using the programming language?

For example:

select columns from table where textcolumn='exactphrase';

vs

select columns from table where key='key';

for (results : resultset) { 
      if (resulsts.getString(textcolumn).equals(exactphrase)) { ... } }

I’m basically curious as to how MySQL (Innodb) deals with filtering text columns and what the performance pitfalls may be (if any).

  • 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-15T02:34:57+00:00Added an answer on June 15, 2026 at 2:34 am

    tldr; There will be no performance difference for “finding” the record.

    Since the (indexed) PK is being used then at most a single record will be returned. The server is smart enough to not perform a table scan on the text column, even if it is not indexed because of the 1-1 cardinality of the PK. (Query planners are smart.)

    The differences are then:

    1. The server might return a “useless” record to the client; this may waste a small amount of bandwidth1 (and slightly more wasteful if the text isn’t required except for the test anyway), but more importantly it muddles semantics of the query.

    2. The server supports different collation modes; it might therefor be case insensitive (e.g.) on the server and result in slightly different results than a client side filter.


    1 While very degenerate cases can be imagined, this should be take as “equivalent time” without an explicit use/performance case. It is, however, IMOHO, still sloppy to do this on the client side without further reason.

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

Sidebar

Related Questions

I don't see any options for doing anything other than an exact match...
So I am doing this query from PHP, and here listerally the exact query
Doing my first SL4 MVVM RIA based application and i ran into the following
Doing some jquery animation. I have certain divs set up with an attribute of
Here's another clichéd problem, but I couldn't find an exact match to this. I
For a project I've to(unfortunately) match some exact url. So I thought it will
I am using a UISearchBar to match text input against entries in a database
Doing the getting started of Sinatra. I get this error: ./sinatra.rb:5: undefined method `get'
Doing an ajax get request works as expected using the following code: $.ajax({ type:
Doing the below will reproduce my problem: New WPF Project Add ListView Name the

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.