Re: [PERFORM] How to speed-up inserts with jdbc

2004-11-11 Thread Edwin Eyan Moragas
On Wed, 10 Nov 2004 14:51:57 +0100, Michael Kleiser [EMAIL PROTECTED] wrote: Statement st = con.createStatement(); java.sql.Timestamp datum = new java.sql.Timestamp(new Date().getTime()); Date start = new Date();

Re: [PERFORM] seqscan strikes again

2004-11-11 Thread Gaetano Mendola
Jim C. Nasby wrote: I'm wondering if there's any way I can tweak things so that the estimate for the query is more accurate (I have run analyze): Can you post your configuration file ? I'd like to see for example your settings about: random_page_cost and effective_cache_size. Regards Gaetano

Re: [PERFORM] How to speed-up inserts with jdbc

2004-11-11 Thread Steinar H. Gunderson
On Thu, Nov 11, 2004 at 04:04:06PM +0800, Edwin Eyan Moragas wrote: how about using PreparedStatment? that's on the java end. on the pg end, maybe do a BEGIN before the for loop and END at the end of the for loop. You don't even need a BEGIN and END; his code has a setAutoComit(true) before

Re: [PERFORM] vacuum analyze slows sql query

2004-11-11 Thread Gaetano Mendola
patrick ~ wrote: --- John Meinel [EMAIL PROTECTED] wrote: If you are trying to establish existence, we also had a whole thread on this. Basically what we found was that adding an ORDER BY clause, helped tremendously in getting the planner to switch to an Index scan. You might try something

Re: [PERFORM] Strange (?) Index behavior?

2004-11-11 Thread Allen Landsidel
Ok, you thought maybe this thread died or got abandoned in the face of all the senseless trolling and spam going on.. you were wrong.. ;) I thought though I'd start over trying to explain what's going on. I've gone through some dumps, and recreation of the database with some different filesystem

Re: [PERFORM] Strange (?) Index behavior?

2004-11-11 Thread Josh Berkus
Allen, Ok, you thought maybe this thread died or got abandoned in the face of all the senseless trolling and spam going on.. you were wrong.. ;) I thought though I'd start over trying to explain what's going on. I've gone through some dumps, and recreation of the database with some

Re: [PERFORM] Strange (?) Index behavior?

2004-11-11 Thread Allen Landsidel
On Thu, 11 Nov 2004 10:52:43 -0800, Josh Berkus [EMAIL PROTECTED] wrote: Allen, Ok, you thought maybe this thread died or got abandoned in the face of all the senseless trolling and spam going on.. you were wrong.. ;) I thought though I'd start over trying to explain what's going on.

Re: [PERFORM] Strange (?) Index behavior?

2004-11-11 Thread Greg Stark
Allen Landsidel [EMAIL PROTECTED] writes: QUERY PLAN --- Index Scan using sname_unique on testtable (cost=0.00..34453.74 rows=8620 width=20) (actual

Re: [PERFORM] How to speed-up inserts with jdbc

2004-11-11 Thread Edwin Eyan Moragas
On Thu, 11 Nov 2004 11:04:18 +0100, Steinar H. Gunderson [EMAIL PROTECTED] wrote: You don't even need a BEGIN and END; his code has a setAutoComit(true) before the for loop, which just has to be changed to setAutoCommit(false) (and add an explicit commit() after the for loop, of course). amen.

Re: [PERFORM] Strange (?) Index behavior?

2004-11-11 Thread Allen Landsidel
On 11 Nov 2004 15:49:46 -0500, Greg Stark [EMAIL PROTECTED] wrote: Allen Landsidel [EMAIL PROTECTED] writes: QUERY PLAN --- Index Scan using

Re: [PERFORM] Strange (?) Index behavior?

2004-11-11 Thread Tom Lane
Allen Landsidel [EMAIL PROTECTED] writes: Clustering is really unworkable in this situation. Nonetheless, please do it in your test scenario, so we can see if it has any effect or not. The speed you're getting works out to about 7.2 msec/row, which would be about right if every single row fetch

Re: [PERFORM] Strange (?) Index behavior?

2004-11-11 Thread Joshua D. Drake
--- Index Scan using sname_unique on testtable (cost=0.00..34453.74 rows=8620 width=20) (actual time=77.004..537065.079 rows=74612 loops=1) Index Cond: