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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T18:23:13+00:00 2026-05-26T18:23:13+00:00

To me, the UNIQUE keyword is for better structuring your table (putting aside the

  • 0

To me, the UNIQUE keyword is for better structuring your table (putting aside the PRIMARY KEY, which is for identification purposes). For example, files. If you don’t want to add the same file to the database you could use its SHA-2 hash key as a UNIQUE KEY. But SHA-2 is 512 characters, and InnoDB has a limit of 255. Why does MySQL have this limit and how does one use larger, more reliable, unique keys such as SHA-2

  • 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-26T18:23:14+00:00Added an answer on May 26, 2026 at 6:23 pm

    SHA2-512 gives 512 bits which is 64 bytes. Or char(128) in hex.

    The unique index key length is 1000 bytes for MyISAM and 767 for InnoDB in MySQL 5.5.

    Unique is used to enforce natural uniqueness when you choose to have an AUTO_INCREMENT surrogate primary key. Or superkey uniqueness when you want to enforce subtypes. etc.

    Edit:

    To enforce uniqueness over LOB values, you just hash it and add a constraint. If you have enough rows to have a measurable risk of collisions, then why do you have so many LOB values in the database?

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

Sidebar

Related Questions

Simple question: what is keyword stuffing? What is the recommended number of unique keywords
I have a string which contains 3 elements: a 3 digit code (example: SIN,
In the Poignant Guide this example of the redo keyword is given: class LotteryTicket
Let's say I have two tables: Table 1 has the columns NOTE_ID (a unique
My primary question is which approach is faster. Some briefing I'm developing an application
How unique is the php session id? I got the impression from various things
The unique poll/vote/survey i mean here is, user can only vote once. How do
Is a GUID unique 100% of the time? Will it stay unique over multiple
How to get unique Google Gadget ID from a gadget added to a iGoogle
I have a unique industrial application where I do not want the Windows CE

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.