Re: [PERFORM] Slow performance on Windows .NET and OleDb

2006-03-28 Thread Chris
Ruben Rubio Rey wrote: Greg Quinn wrote: The query is, select * from users which returns 4 varchar fields, there is no where clause Yes, I am running the default postgres config. Basically I have been a MySQL user and thought I would like to check out PostGreSql. So I did a quick performan

Re: [PERFORM] Slow performance on Windows .NET and OleDb

2006-03-28 Thread Ruben Rubio Rey
Greg Quinn wrote: The query is, select * from users which returns 4 varchar fields, there is no where clause Yes, I am running the default postgres config. Basically I have been a MySQL user and thought I would like to check out PostGreSql. So I did a quick performance test. The performance

Re: [PERFORM] Slow performance on Windows .NET and OleDb

2006-03-28 Thread Greg Quinn
Via insert When you do the population, is it via inserts or copy? Joshua D. Drake -- === The PostgreSQL Company: Command Prompt, Inc. === Sales/Support: +1.503.667.4564 || 24x7/Emergency: +1.800.492.2240 Providing the most comprehensive PostgreSQL solutions since 19

Re: [PERFORM] Slow performance on Windows .NET and OleDb

2006-03-28 Thread Greg Quinn
The query is, select * from users which returns 4 varchar fields, there is no where clause Yes, I am running the default postgres config. Basically I have been a MySQL user and thought I would like to check out PostGreSql. So I did a quick performance test. The performance was so different th

Re: [PERFORM] simple join uses indexes, very slow

2006-03-28 Thread stef
If your looking for suggestions, I would suggest updating the 8.1.x you have installed to the latest version, as of typing this is 8.1.3 ;) Most notable is some of the -bug- fixes that are in since 8.1.0, for example; * Fix incorrect optimizations of outer-join conditions (Tom) You know, mi

Re: [PERFORM] simple join uses indexes, very slow

2006-03-28 Thread Chris
george young wrote: [PostgreSQL 8.1.0 on i686-pc-linux-gnu, compiled by GCC gcc (GCC) 4.0.1] I have a simple join on two tables that takes way too long. Can you help me understand what's wrong? There are indexes defined on the relevant columns. I just did a fresh vacuum --full --analyze on the

Re: [PERFORM] MVCC intro and benefits docs?

2006-03-28 Thread Qingqing Zhou
""Jim C. Nasby"" <[EMAIL PROTECTED]> wrote > > It's not dedicated to discussing MVCC alone, but > http://www.pervasive-postgres.com/lp/newsletters/2005/Insights_opensource_Dec.asp#2 > might provide you with some useful info. > -- Another introduction is here: http://www.postgresql.org/files/dev

Re: [PERFORM] simple join uses indexes, very slow

2006-03-28 Thread Dave Dutcher
> -Original Message- > From: [EMAIL PROTECTED] [mailto:pgsql-performance- > [EMAIL PROTECTED] On Behalf Of Steinar H. Gunderson > A merge join requires sorted inputs. > > > Most of the time was spent sorting the parameters parameters table by > > opset_num even though opset_num is indexed

Re: [PERFORM] MVCC intro and benefits docs?

2006-03-28 Thread Jim C. Nasby
On Tue, Mar 28, 2006 at 10:27:39PM +0200, Antoine wrote: > Hi, > Does anyone know of any fairly entry-level documentation for the > benefits-drawbacks of MVCC in the db? As it relates to performance? > Postgres vs the others? > Cheers > Antoine It's not dedicated to discussing MVCC alone, but http

Re: [PERFORM] Decide between Postgresql and Mysql (help of

2006-03-28 Thread Jim C. Nasby
Heh, too quick on the send button... On Tue, Mar 28, 2006 at 09:42:51PM +0200, PFC wrote: > I'll only speak about MyISAM. MySQL == MyISAM. InnoDB is useless : > if you want transactions, use postgres. > If you say to yourself "oh yeah, but it would be cool to use a > MyI

Re: [PERFORM] Decide between Postgresql and Mysql (help of

2006-03-28 Thread Jim C. Nasby
On Tue, Mar 28, 2006 at 09:42:51PM +0200, PFC wrote: > However, throw in some maintenance operation which involves a long > query with writes (like a big joined UPDATE) and all access to your > website is blocked while the query lasts. > This is worsened by the fact that MySQL

Re: [PERFORM] Decide between Postgresql and Mysql (help of

2006-03-28 Thread PFC
What really makes innodb useless to me is that there's no real support for proper operation by MySQL itself. If you could force MySQL to only use innodb tables, and to NEVER do the wrong things syntactically, it would be ok. But there are thousands of foot-guns in the MySQL That's wh

Re: [PERFORM] Decide between Postgresql and Mysql (help of

2006-03-28 Thread PFC
So, what exactly are you planning on doing? The application will be a chat for web, the chats will be stored in the server. In a determined interval of time... more or less 2 seconds, the application will be looking for new messages. I believe that it will make many accesses. The write in dis

Re: [PERFORM] simple join uses indexes, very slow

2006-03-28 Thread george young
On Tue, 28 Mar 2006 19:17:49 +0100 Simon Riggs <[EMAIL PROTECTED]> threw this fish to the penguins: > On Tue, 2006-03-28 at 10:22 -0500, george young wrote: > > > work_mem= 1024 > > Set that higher. > > Try a couple of other plans using enable_* and let us have the EXPLAIN > ANALYZE plans. I tr

Re: [PERFORM] Decide between Postgresql and Mysql (help of

2006-03-28 Thread Chris Travers
Marcos wrote: So, what exactly are you planning on doing? The application will be a chat for web, the chats will be stored in the server. In a determined interval of time... more or less 2 seconds, the application will be looking for new messages. I believe that it will make many accesse

Re: [PERFORM] Decide between Postgresql and Mysql (help of

2006-03-28 Thread PFC
This is as much about the code in front of the database as the database itself. You'll want to use an architecture that supports pooled connections (java, php under lighttpd, etc...) and you'll want to look Well, anybody who uses PHP and cares about performance is already using lighttpd,

Re: [PERFORM] Decide between Postgresql and Mysql (help of

2006-03-28 Thread Scott Marlowe
On Tue, 2006-03-28 at 13:42, PFC wrote: > > This is as much about the code in front of the database as the database > > itself. You'll want to use an architecture that supports pooled > > connections (java, php under lighttpd, etc...) and you'll want to look > > Well, anybody who uses PHP a

Re: [PERFORM] Decide between Postgresql and Mysql (help of

2006-03-28 Thread Marcos
> So, what exactly are you planning on doing? The application will be a chat for web, the chats will be stored in the server. In a determined interval of time... more or less 2 seconds, the application will be looking for new messages. I believe that it will make many accesses. The write in disc

[PERFORM] MVCC intro and benefits docs?

2006-03-28 Thread Antoine
Hi, Does anyone know of any fairly entry-level documentation for the benefits-drawbacks of MVCC in the db? As it relates to performance? Postgres vs the others? Cheers Antoine -- This is where I should put some witty comment. ---(end of broadcast)--

Re: [PERFORM] Decide between Postgresql and Mysql (help of

2006-03-28 Thread Scott Marlowe
On Tue, 2006-03-28 at 09:31, Marcos wrote: > Hi, > > I'm a Postgresql's user and I think that it's very very good and > robust. > > In my work we're confuse between where database is the best choose: > Postgresql or Mysql. The Mysql have the reputation that is very fast > working in the web but

Re: [PERFORM] Decide between Postgresql and Mysql (help of comunity)

2006-03-28 Thread Madison Kelly
Marcos wrote: > Hi, > > I'm a Postgresql's user and I think that it's very very good and > robust. > > In my work we're confuse between where database is the best choose: > Postgresql or Mysql. The Mysql have the reputation that is very fast > working in the web but in our application we are est

[PERFORM] Decide between Postgresql and Mysql (help of comunity)

2006-03-28 Thread Marcos
Hi, I'm a Postgresql's user and I think that it's very very good and robust. In my work we're confuse between where database is the best choose: Postgresql or Mysql. The Mysql have the reputation that is very fast working in the web but in our application we are estimating many access simultaneo

Re: [PERFORM] simple join uses indexes, very slow

2006-03-28 Thread Simon Riggs
On Tue, 2006-03-28 at 10:22 -0500, george young wrote: > work_mem= 1024 Set that higher. Try a couple of other plans using enable_* and let us have the EXPLAIN ANALYZE plans. Best Regards, Simon Riggs ---(end of broadcast)--- TIP 5: don't forget

Re: [PERFORM] Slow performance on Windows .NET and OleDb

2006-03-28 Thread Joshua D. Drake
Jim C. Nasby wrote: On Tue, Mar 28, 2006 at 02:14:00PM +0200, Greg Quinn wrote: Hello, I have just installed PostGreSql 8.1 on my Windows XP PC. I created a simple table called users with 4 varchar fields. I am using the OleDb connection driver. In my .NET application, I populate 3000 recor

Re: [PERFORM] Massive Inserts Strategies

2006-03-28 Thread Jim C. Nasby
Is there some other unique key you can test on? Take a look at http://lnk.nu/cvs.distributed.net/8qt.sql lines 169-216 for an exammple. In this case we use a different method for assigning IDs than you probably will, but the idea remains. On Tue, Mar 28, 2006 at 10:59:49AM -0500, ashah wrote: > I

Re: [PERFORM] simple join uses indexes, very slow

2006-03-28 Thread Steinar H. Gunderson
On Tue, Mar 28, 2006 at 11:20:19AM -0600, Dave Dutcher wrote: > I guess what I am really curious about is why was the OP getting an > expensive sort when the planner tried a merge join? A merge join requires sorted inputs. > Most of the time was spent sorting the parameters parameters table by >

Re: [PERFORM] Slow performance on Windows .NET and OleDb

2006-03-28 Thread Jim C. Nasby
On Tue, Mar 28, 2006 at 02:14:00PM +0200, Greg Quinn wrote: > Hello, > > I have just installed PostGreSql 8.1 on my Windows XP PC. I created a > simple table called users with 4 varchar fields. > > I am using the OleDb connection driver. In my .NET application, I populate > 3000 records into th

Re: [PERFORM] simple join uses indexes, very slow

2006-03-28 Thread Jim C. Nasby
On Tue, Mar 28, 2006 at 06:29:08PM +0200, Steinar H. Gunderson wrote: > On Tue, Mar 28, 2006 at 10:18:25AM -0600, Dave Dutcher wrote: > >> "parameters_idx" btree (run, opset_num, step_num, opset, > > opset_ver, > >> step, step_ver, name, split, wafers) > >> "parameters_opset_idx" btree (ops

Re: [PERFORM] count(*) performance

2006-03-28 Thread Jim C. Nasby
On Mon, Mar 27, 2006 at 12:20:54PM -0700, Brendan Duddridge wrote: > Does that mean that even though autovacuum is turned on, you still > should do a regular vacuum analyze periodically? Doing a periodic vacuumdb -avz and keeping an eye on the last few lines isn't a bad idea. It would also be he

Re: [PERFORM] simple join uses indexes, very slow

2006-03-28 Thread Dave Dutcher
> -Original Message- > From: [EMAIL PROTECTED] [mailto:pgsql-performance- > [EMAIL PROTECTED] On Behalf Of Steinar H. Gunderson > Sent: Tuesday, March 28, 2006 10:29 AM > > An index on (A,B,C) can be used for a query on (A,B) or (A), so it doesn't > really matter. It isn't usable for a que

Re: [PERFORM] simple join uses indexes, very slow

2006-03-28 Thread Steinar H. Gunderson
On Tue, Mar 28, 2006 at 10:18:25AM -0600, Dave Dutcher wrote: >> "parameters_idx" btree (run, opset_num, step_num, opset, > opset_ver, >> step, step_ver, name, split, wafers) >> "parameters_opset_idx" btree (opset, step, name) >> "parameters_step_idx" btree (step, name) > Have you tried

Re: [PERFORM] simple join uses indexes, very slow

2006-03-28 Thread Dave Dutcher
> -Original Message- > From: [EMAIL PROTECTED] [mailto:pgsql-performance- > [EMAIL PROTECTED] On Behalf Of george young > Sent: Monday, March 27, 2006 12:48 PM > To: pgsql-performance@postgresql.org > Subject: [PERFORM] simple join uses indexes, very slow > [Snip] > > Indexes: > "pa

Re: [PERFORM] Massive Inserts Strategies

2006-03-28 Thread Markus Schaber
Hi, ashah, ashah wrote: > I tried this solution, but ran into following problem. > > The temp_table has columns (col1, col2, col3). > > The original_table has columns (col0, col1, col2, col3) > Now the extra col0 on the original_table is the unique generated ID by > the database. INSERT INTO o

Re: [PERFORM] Massive Inserts Strategies

2006-03-28 Thread ashah
I tried this solution, but ran into following problem. The temp_table has columns (col1, col2, col3). The original_table has columns (col0, col1, col2, col3) Now the extra col0 on the original_table is the unique generated ID by the database. How can I make your suggestions work in that case .

Re: [PERFORM] simple join uses indexes, very slow

2006-03-28 Thread Markus Schaber
Hi, George, george young wrote: >>Looks like a hash join might be faster. What is your work_mem set to? > > work_mem= 1024 This is 1 Megabyte. By all means, increase it, if possible. HTH, Markus -- Markus Schaber | Logical Tracking&Tracing International AG Dipl. Inf. | Software Developme

Re: [PERFORM] simple join uses indexes, very slow

2006-03-28 Thread george young
On Tue, 28 Mar 2006 09:30:54 +0100 Simon Riggs <[EMAIL PROTECTED]> threw this fish to the penguins: > On Mon, 2006-03-27 at 13:47 -0500, george young wrote: > > > Table sizes: parameters has 2.1512e+07 tuples, run_opsets has 211745 tuples. > > > > explain analyze SELECT ro.run, ro.opset_num, p.s

Re: [PERFORM] Slow performance on Windows .NET and OleDb

2006-03-28 Thread Merlin Moncure
On 3/28/06, Greg Quinn <[EMAIL PROTECTED]> wrote: > I am using the OleDb connection driver. In my .NET application, I populate > 3000 records into the table to test PostGreSql's speed. It takes about 3-4 > seconds. have you tried: 1. npgsql .net data provider 2. odbc ado.net bridge merlin --

[PERFORM] Slow performance on Windows .NET and OleDb

2006-03-28 Thread Greg Quinn
Hello, I have just installed PostGreSql 8.1 on my Windows XP PC. I created a simple table called users with 4 varchar fields. I am using the OleDb connection driver. In my .NET application, I populate 3000 records into the table to test PostGreSql's speed. It takes about 3-4 seconds. Even

Re: [PERFORM] count(*) performance

2006-03-28 Thread Markus Schaber
Gábriel Ákos wrote: > I thought that too. Autovacuum is running on our system but it didn't do > the trick. Anyway the issue is solved, thank you all for helping. :) Hi, Gabriel, it may be that your Free Space Map (FSM) setting is way to low. Try increasing it. Btw, VACUUM outputs a Warning if

Re: [PERFORM] simple join uses indexes, very slow

2006-03-28 Thread Simon Riggs
On Mon, 2006-03-27 at 13:47 -0500, george young wrote: > Table sizes: parameters has 2.1512e+07 tuples, run_opsets has 211745 tuples. > > explain analyze SELECT ro.run, ro.opset_num, p.step_num FROM run_opsets ro, > parameters p WHERE ro.run = p.run AND ro.opset_num = p.opset_num and > ro.run='