ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Clinton Begin" <clinton.be...@gmail.com>
Subject Re: [HELP] Does iBatis support multi DB ?
Date Thu, 22 Jun 2006 05:07:29 GMT
Yeah, 1 millon records would be a bad idea regardless of iBATIS or any other
technology you're using.

iBATIS supports pagination through queryForList() using offset and length
type parameters to ensure you only get back a certain number of rows.  But
DO NOT use PaginatedList for such a thing.

More importantly, SQL has a neat feature called a "WHERE" clause.  ;-)  Use
it.  Don't ever return that many rows.

Really though, unless you're building the next Google....I'd really wonder
why you'd ever have or need 1 Million rows in an OLTP system.... (which I'm
assuming if you're using Tomcat -- it's not a reporting or ETL program).

Anyway, just some things to think about.

Clinton



On 6/21/06, Pham Anh Tuan <anhtuan@ichi-corp.jp> wrote:
>
>  oh, thank you, Clinton :)
>
> I have one more question, if there's one query which retrieve 1 million
> records, what happens?, will my web application be out of heap space :? I
> use Tomcat
>
> thanks in advance :)
>
> ----- Original Message -----
> *From:* Clinton Begin <clinton.begin@gmail.com>
> *To:* user-java@ibatis.apache.org
> *Sent:* Thursday, June 22, 2006 8:36 AM
> *Subject:* Re: [HELP] Does iBatis support multi DB ?
>
> Yes, the same way JDBC supports multiple databases.
>
> SQL Maps doesn't do anything special, but there's no reason you can't use
> it with multiple databases in a single application.
>
> The DAO framework though, does allow you to configure multiple database
> contexts within a single DAO factory.
>
> Cheers,
> Clinton
>
> On 6/21/06, Pham Anh Tuan <anhtuan@ichi-corp.jp> wrote:
> >
> >  Hi all,
> >
> > I wonder can I use iBatis in a web app which uses multi datasource (DB)
> > ?
> >
> > help me, thanks in advance!
> >
> > bowlkhin
> >
>
>

Mime
View raw message