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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T00:03:10+00:00 2026-05-18T00:03:10+00:00

I am working with a web site analyser which will be used to analyse

  • 0

I am working with a web site analyser which will be used to analyse our own site according to the log from tomcat.

Now,we push the log from tomcat to the database (MySQL) everyday, it works well now. However I found a potential and fatal problem !

Until now we push the log to a single table in the database,but the log items will increase rapidly soon especially when we hold more users, obviously a single table can not save so many log items (also it will result in a low performance when do the query operation from the large table).

And we use the hibernate as the persistence layer,each row in the log table is mapped to a java object of LogEntry in the application.

I have thought create a new table each month,but how to make the LogEntry map to more than one tables and query across tables?

Also,the log number of each month maybe not the same, an extreme example, how about the log number (records in the table) is greater than the max capacity of the table in db?

Then I thought set a property to limit the max number of log to be pushed when hibernate push log to db. If so I have no idea to tell the hibernate create a new table and query across table automatically.

Any ideas?

Update to Sandy:

I know your meaning, that’s to say the max capability of a table is decided by the OS, and if I use the partitioning, the max capability maybe increase until it up to the max capability of my disk. However even if I use the partition, it seems that I do not need to care about the max capability of the table, but if the table hold too many records, it will result in a low performance. (BTW, we have not decide to delete the old logs yet.) Another way I thought is create more than tables with the same structure,but I am using the hibernate,all of the log inserting and querying will through the hibernate, and can the Entity (POJO) mapped to more than one table?

  • 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-18T00:03:10+00:00Added an answer on May 18, 2026 at 12:03 am

    I have thought create a new table each month, but how to make the LogEntry map to more than one tables and query across tables?

    Have a look at Hibernate Shards (database sharding is a method of horizontal partitioning). Although this suproject is not very active and has some limitations (refer to the documentation), it’s stable and usable (Hibernate Shards has been contributed by Max Ross from Google who is using it internally).

    Also,the log number of each month maybe not the same,a extreme example, how about the log number(records in the table) is greater than the max capacity of the table in db?

    Monitor your database/tables and anticipate the required maintenance.

    If so I have no idea to tell the hibernate create a new table and query accross table automatically.

    Hibernate won’t do that automatically, this will be part of the maintenance of the database and of the sharding configuration (see also the section about Virtual Shards).

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

Sidebar

Related Questions

I'm working on an ASP .NET 2.0 site which uses a Web Application project
When working with the Web Site style ASP.NET project, VS.NET will compile all the
Im working on a web site that has to be reachable from many countries
I'm working on a web site which contains sections that need to be secured
Very often when working on an ASP.NET web site, the options View Code and
I'm working on an asp.net web site. We have to use com interop to
I'm working on a 10 page web site with a database back-end. There are
I'm working on a web site (not a web application) in VS 2008 .Net
I'm working on a web site written using asp.net WebForms. I'd like two wrap
I'm working on a web site project that is currently tracked in svn but

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.