-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: Reports - using views or something else?
PostPosted: Thu Sep 02, 2010 6:36 am 
Newbie

Joined: Thu Sep 02, 2010 6:18 am
Posts: 1
Hibernate version: 3.2.7
MySQL version: 5.1.45

Hello,

I am developing a system that's going to have few hundred thousand or even million records in it.
This system should be able to make reports that contain information from hundreds or more records but I only need one or two columns from handful of tables.
Problem is that reading this information Hibernate loads tons of unnecessary information and it isn't very fast.
Here is small part of the tables in DB:
Code:
Order
|__Orderline
     |__Delivery
     |__Item
     |    |__Conditions
     |    |__Classifications
     |__Address
         |__Coordinates


Now for example from Order I need id and issueDate, from Orderline description and from Delivery min(latestDelivery). I don't need anything from the other tables (but they are eagerly loaded anyway).

Can I use views in Hibernate to gather data for the report or is there anyway else to solve this problem? And How is this done if possible?

I read somewhere that I can make classes that only use part of the table fields, is this true? As meaning that Hibernate creates a table Order(id, confirmed, orderlines, note, issudate, project_id, account_id) and then there is another class that uses part of the fields Order_view(id, orderlines, issuedate).

Mikko


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.