Re: [PERFORM] Select performance vs. mssql

2005-05-23 Thread Neil Conway
mark durrant wrote: PostgreSQL Machine: "Aggregate (cost=140122.56..140122.56 rows=1 width=0) (actual time=24516.000..24516.000 rows=1 loops=1)" " -> Index Scan using "day" on mtable (cost=0.00..140035.06 rows=35000 width=0) (actual time=47.000..21841.000 rows=1166025 loops=1)" "Inde

Re: [PERFORM] Select performance vs. mssql

2005-05-23 Thread mark durrant
> Post the result of this for us: > > explain analyze select count(*) from mtable where > day='Mon'; > > On both machines. Hi Chris -- PostgreSQL Machine: "Aggregate (cost=140122.56..140122.56 rows=1 width=0) (actual time=24516.000..24516.000 rows=1 loops=1)" " -> Index Scan using "day" on m

Re: [PERFORM] Select performance vs. mssql

2005-05-23 Thread Christopher Kings-Lynne
select count(*) from mtable where day='Mon' Results: 1. P3 600 512MB RAM MSSQL. It takes about 4-5 secs to run. If I run a few queries and everything is cached, it is sometimes just 1 second. 2. Athlon 1.3 Ghz 1GB RAM. PostgreSQL takes 7 seconds. I have played with the buffers setting and cu

[PERFORM] Select performance vs. mssql

2005-05-23 Thread mark durrant
Hi, I have some experience with MSSQL and am examining PostgreSQL. I'm running under Windows. I like what I see so far, but I'm hoping for some performance advice: 1. My test database has 7 million records. 2. There are two columns - an integer and a char column called Day which has a random val

Re: [PERFORM] seqential vs random io

2005-05-23 Thread Anjan Dave
I would tell him to go for the random, which is what most DBs would be by nature. What you need to understand will be the cache parameters, read/write cache amount, and stripe size, depending on your controller type and whatever it defaults to on these things. Thanks, Anjan -Origi

Re: [PERFORM] seqential vs random io

2005-05-23 Thread Josh Berkus
David, > > I just got a question from one our QA guys who is configuring a RAID 10 > > disk that is destined to hold a postgresql database. The disk > > configuration procedure is asking him if he wants to optimize for > > sequential or random access. My first thought is that random is what we > >

Re: [PERFORM] seqential vs random io

2005-05-23 Thread John A Meinel
David Parker wrote: > I just got a question from one our QA guys who is configuring a RAID 10 > disk that is destined to hold a postgresql database. The disk > configuration procedure is asking him if he wants to optimize for > sequential or random access. My first thought is that random is what we

Re: [PERFORM] Fwd: Index on table when using DESC clause

2005-05-23 Thread Yves Vindevogel
God I love the sheer brilliance of that minus trick :-)) Tnx a lot BTW: Are there any plans to change this kind of indexing behaviour ? It makes no sense at all, and, it makes databases slow when you don't know about this. On 23 May 2005, at 23:15, Andrew Lazarus wrote: What you are trying to

[PERFORM] seqential vs random io

2005-05-23 Thread David Parker
I just got a question from one our QA guys who is configuring a RAID 10 disk that is destined to hold a postgresql database. The disk configuration procedure is asking him if he wants to optimize for sequential or random access. My first thought is that random is what we would want, but then

Re: [PERFORM] Tuning planner cost estimates

2005-05-23 Thread Simon Riggs
On Fri, 2005-05-20 at 15:23 -0700, Josh Berkus wrote: > > Well, that raises an interesting issue, because AFAIK none of the cost > > estimate functions currently do that. Heck, AFAIK even the piggyback > > seqscan code doesn't take other seqscans into account. > > Sure. But you're striving for g

Re: [PERFORM] Fwd: Index on table when using DESC clause

2005-05-23 Thread Andrew Lazarus
As far as I know, to use a straight index Postgres requires either ORDER BY pages, description -- or -- ORDER BY pages DESC, description DESC. If you want the results by pages DESC, description ASC, then you have to make an index on an expression or define your own operator or something esoter

Re: [PERFORM] Fwd: Index on table when using DESC clause

2005-05-23 Thread Oleg Bartunov
You didn't say what version of PostgreSQL you're trying. I recall old version doesn't used index for backward pagination. Oleg On Mon, 23 May 2005, Yves Vindevogel wrote: I tried that, but create index ixTest on table1 (pages desc, documentname) gives me a syntax error On 23 May 2005, at 2

Re: [PERFORM] Fwd: Index on table when using DESC clause

2005-05-23 Thread Yves Vindevogel
I tried that, but create index ixTest on table1 (pages desc, documentname) gives me a syntax error On 23 May 2005, at 20:03, Steinar H. Gunderson wrote: On Mon, May 23, 2005 at 07:41:19PM +0200, Yves Vindevogel wrote: However, when I query my db using for instance order by pages, documentn

Re: [PERFORM] Fwd: Index on table when using DESC clause

2005-05-23 Thread Steinar H. Gunderson
On Mon, May 23, 2005 at 07:41:19PM +0200, Yves Vindevogel wrote: > However, when I query my db using for instance order by pages, > documentname, it is very fast. > If I use order by pages desc, documentname, it is not fast at > all, like it is not using the index properly at all. Make an

[PERFORM] Fwd: Index on table when using DESC clause

2005-05-23 Thread Yves Vindevogel
Begin forwarded message: From: Yves Vindevogel <[EMAIL PROTECTED]> Date: Mon 23 May 2005 19:23:16 CEST To: [EMAIL PROTECTED] Subject: Index on table when using DESC clause Hi, I have a table with multiple fields. Two of them are documentname and pages I have indexes on documentname and on pag