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: SysCache provider or NHibernate = Crap?
PostPosted: Mon Oct 26, 2009 8:37 am 
Newbie

Joined: Mon Oct 05, 2009 5:06 am
Posts: 6
Hi.

What's up with this Query Cache?

How should I use it?

I use named queries, that uses stored procedures to get my list of entities from the database.

When testing using the query cache, (SysCache) it tries to load the data it self, ignoring my custom SQL statements, so trying to do a SELECT instead of EXEC SP_*

Is there a way, to prevent this, I mean I get it, it only stores ID's, TimeStamps and Value data..

But it should cache/fetch the complete collection, not a single entity.

I have very very large tables in my database, that needs custom joins with tables that hold clustered indexes on foreign-keys, other wise, it would take minutes instead of miliseconds to load the data. And I really wouldn't know how to map those using NHibernate's mapping declarations, if that is possible in the first place.

NHibernate documentation and resources on the web, really really annoy the hell out of me :-) because they are all written in a USAGE kind of way, without telling about the TECHNICAL background, leaving many questions I instantly come up with, when reading them, leaving me with many assumptions to make.

Example:

Quote:
A table-based dependency will monitor the data in a database table for changes. Table-based dependencies are generally used for a SQL Server 2000 database but will work with SQL Server 2005 as well. Before you can use SQL Server cache invalidation with table based dependencies, you need to enable notifications for the database. This task is performed with the aspnet_regsql command. With table-based notifications, the application will poll the database for changes at a predefined interval. A cache region will not be invalidated immediately when data in the table changes. The cache will be invalidated the next time the application polls the database for changes.


Instant Question: Does that mean that any change to the database will invalidate the cache, or does it lookup the ID's of the entities?

I know this is a simple question, it's easy to look that up, based on the capabilities of the sql server stored procedure, (although that would include the assumption that NHibernate uses all that functionality), or just create a usage test, but it would be so easy to put that in to the documentation, saving new users so much time...


Does anyone here know what I am talking about?


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.