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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T20:16:26+00:00 2026-06-17T20:16:26+00:00

In my database I have a hash and size fields. When I want to

  • 0

In my database I have a hash and size fields. When I want to search this table I always have a size and hash to compare against. Which column should I index? I’m thinking the hash is a blob so maybe that datatype is not very good to check against even though I know they will be X bits wide (i haven’t chosen but i think i’ll use SHA256)

Should I index the hash column or size?

  • 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-17T20:16:27+00:00Added an answer on June 17, 2026 at 8:16 pm

    The hash should probably not be stored in a BLOB column — it’s of a small known size, and you will probably want to search it. Storing it in a BINARY column, or even just storing it in a VARCHAR in hex format, would be much more appropriate.

    Once you’ve fixed that up, answering the question is simple: Will you be sorting or searching for rows based on the size or hash? If either of these is the case, then the column should be indexed. Otherwise, there’s no need.

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

Sidebar

Related Questions

i have database table like this +-------+--------------+----------+ | id | ip | date |
My database table have a Timestamp column named as inTime and i am using
I have a program in which I will compare hash values generated from my
In my database I have a computed column that contains a SHA1 hash of
I have a database table (MySQL 5) which stores file hashes and filenames. I
I want to compare an image against a database of images to find any
I have this hash. I am trying to render in a view. Which me
i have database with two values id and val so i want to ask
I have database application, I want to allow the user to restore the deleted
I have a database where encoding is UTF-8 for multilingual purpose. I this that

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.