From: | jim(at)reptiles(dot)org (Jim Mercer) |
---|---|
To: | bvonmoss(at)bigfoot(dot)com (Bob VonMoss) |
Cc: | pgsql-general(at)postgreSQL(dot)org |
Subject: | Re: [GENERAL] restricting select statements |
Date: | 1999-02-24 05:37:38 |
Message-ID: | m10FX0t-00080sC@mailbox.reptiles.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
> I'm working with JDBC and if I issue a broad SELECT statement, with a
> good amount of records (2000) it takes quite a while to execute the
> query and send the results back, even up to a minute, when I only want
> about the first 100 records. If I restrict the search, it is satisfied
> in a much more reasonable amount of time. The problem is that I can only
> know how big the database. I could do a count and get an idea of how
> large the database is and make a guess that the data is uniformly
> distributed. There was a java command to restrict the number of records
> saved setMaxSize(); but this does not seem to decrease the time of
> execution of executeQuery(), and probably only uses less local memory.
have a look at using cursors.
worked for me.
--
[ Jim Mercer Reptilian Research jim(at)reptiles(dot)org +1 416 410-5633 ]
[ The telephone, for those of you who have forgotten, was a commonly used ]
[ communications technology in the days before electronic mail. ]
[ They're still easy to find in most large cities. -- Nathaniel Borenstein ]
From | Date | Subject | |
---|---|---|---|
Next Message | Adam Haberlach | 1999-02-24 06:23:05 | Indexing of text fields |
Previous Message | Bob VonMoss | 1999-02-24 05:35:52 | restricting select statements |