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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T01:02:54+00:00 2026-05-12T01:02:54+00:00

I have a log that is really huge. (millions of rows) LogTable ——- ID

  • 0

I have a log that is really huge. (millions of rows)

LogTable
-------
ID    
DATE   
BASEURL
QUERYSTRING
USER   
REFERRER  
USERAGENT
SERVER

I want to slim this table down by normalizing the data. (slim the size)

I know! I know! A log should be a super-fast insert. On the other hand, the log table is so huge, the maintenance plan is getting ugly. So I’m only concerned with highly repetitive columns like BASEURL, USER, SERVER, and USERAGENT.

Now, I know logging must still be fast, so I don’t want to do string comparisons, which leads to my question:

Can I rely on storing

binary_checksum(COLUMN_VALUE) 

in the LogTable, and keep a mapping of COLUMN_VALUE to its checksum in a separate table?

In my application, I would keep a cache of the mappings so I wouldn’t need to go back to the database server for every request. (Only if I have a new checksum value, I’d need to insert into the Mapping table.)

The main goal is to be able to run some simple analytical queries on the table, as well as extract the data without completely grinding the database (and my application) to a halt.

Here’s a simple query, for example:

select 
   count(1)
,  [user] /* This is a checksum value, which I can lookup in my cache */
from
   LogTable
where date between @from and @to
group by [user]

What do you think? Is this checksum approach ok?

Edit:

  • All my columns are varchar(2000) or less.
  • I would assume it also allows me to index the data faster? (I would index an offline/transformational copy)
  • 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-12T01:02:55+00:00Added an answer on May 12, 2026 at 1:02 am

    What is your hash collision strategy? A checksum that results in a 32 bit digest has a 50% collision probability after only 65k entries. This is because of the meet-in-the-middle collisions. For millions of rows, you’ll have a very high hash collision probability.

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

Sidebar

Related Questions

We've faced strange problem. We have log on service, that authenticates user, adds auth
I have a log function on my admin panel that checks user input for
I have a really huge log file from which i need to search stuff.
I have the following log entry that I am processing in PowerShell I'm trying
I have a log file in SqlServer that stores the time an application started,
I have made a small log service that i want to publish to a
I have a directory full of log files that I need to rotate using
In my ASP.NET application, i have a procedure that log all exceptions to a
I have a internal website that users log into. This data is saved as
I have a table that contains log entries for a program I'm writing. I'm

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.