pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Large Tables
2+ messages / 2 participants
[nested] [flat]

* Large Tables
@ 2004-08-11 12:15  Waldomiro <wmiro@ig.com.br>
  0 siblings, 1 reply; 2+ messages in thread

From: Waldomiro @ 2004-08-11 12:15 UTC (permalink / raw)
  To: pgsql-jdbc

Hi,

It's my first time working with PostgreSql, so I have some doubts.

My application is working very fine, but I have few records in my tables.

I need to build a table which I know will have more than 1 milion of records.

I'm afraid if It will work, I mean the indexes will not get corrupted ?

Or maybe it can get slower when every computer is reading the table ?

I supose someone has already  worked with large tables.

How is It ?

There is something I would know ? because I don't want to have surprises.

Your sugestions will be very useful.

Thank you.

SHX INFORMÁTICA LTDA.
Waldomiro Caraiani 
Desenvolvimento de Produto
+ 55 11 5581 1551 
wmiro@shx.com.br 
www.shx.com.br 

^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: Large Tables
@ 2004-08-11 13:30  Dave Cramer <pg@fastcrypt.com>
  parent: Waldomiro <wmiro@ig.com.br>
  0 siblings, 0 replies; 2+ messages in thread

From: Dave Cramer @ 2004-08-11 13:30 UTC (permalink / raw)
  To: Waldomiro <wmiro@ig.com.br>; +Cc: pgsql-jdbc

This is sort of the wrong list, but I'll address jdbc specific issues
with large tables.

First of all, there are postgres databases with terabytes of data, so
large tables are not an issue.

Now you need to be aware that if you do a select * from large table
without cursors, then the server will return the entire result set at
once. This means that the driver will try to build the result set with 1
million rows, and chances are you will get an out of memory exception.

So, you will have to use setFetchSize() to allow the driver to fetch the
data in smaller chunks, or use cursors explicitly.

Additionally, the driver will only use cursors internally if you turn
auto commit off. This is an artifact of the way cursors work in pg. They
are only updateable within a transaction.

Dave
On Wed, 2004-08-11 at 08:15, Waldomiro wrote:
> Hi,
>  
> It's my first time working with PostgreSql, so I have some doubts.
>  
> My application is working very fine, but I have few records in my
> tables.
>  
> I need to build a table which I know will have more than 1 milion of
> records.
>  
> I'm afraid if It will work, I mean the indexes will not get corrupted
> ?
>  
> Or maybe it can get slower when every computer is reading the table ?
>  
> I supose someone has already  worked with large tables.
>  
> How is It ?
>  
> There is something I would know ? because I don't want to have
> surprises.
>  
> Your sugestions will be very useful.
>  
> Thank you.
>  
> SHX INFORMÁTICA LTDA.
> Waldomiro Caraiani 
> Desenvolvimento de Produto
> + 55 11 5581 1551 
> wmiro@shx.com.br
> www.shx.com.br
-- 
Dave Cramer
519 939 0336
ICQ # 14675561




^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2004-08-11 13:30 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2004-08-11 12:15 Large Tables Waldomiro <wmiro@ig.com.br>
2004-08-11 13:30 ` Dave Cramer <pg@fastcrypt.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox