Re: [GENERAL] Anything I can do to speed up this query?

2006-12-07 Thread Ragnar
[ Marcus, you should folow up to the lists, so that other people can benefit from the discussion ] On fim, 2006-12-07 at 09:25 +0100, Marcus Engene wrote: > Ragnar skrev: > > On mið, 2006-12-06 at 17:34 -0500, Wei Weng wrote: > >> On Tue, 2006-12-05 at 15:56 -0500, Wei Weng wrote: > >>> I have a

Re: [GENERAL] Anything I can do to speed up this query?

2006-12-06 Thread Ron Johnson
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 12/06/06 16:34, Wei Weng wrote: > On Tue, 2006-12-05 at 15:56 -0500, Wei Weng wrote: [snip] > I think I have discovered the reason for why the query runs so slow. The > original query has an ORDER BY Field1 clause that I forgot to put in my > email.

Re: [GENERAL] Anything I can do to speed up this query?

2006-12-06 Thread Casey Duncan
On Dec 6, 2006, at 2:34 PM, Wei Weng wrote: On Tue, 2006-12-05 at 15:56 -0500, Wei Weng wrote: I have a table that has roughly 200,000 entries and many columns. The query is very simple: SELECT Field1, Field2, Field3... FieldN FROM TargetTable; TargetTable has an index that is Field1. I t

Re: [GENERAL] Anything I can do to speed up this query?

2006-12-06 Thread Ragnar
On mið, 2006-12-06 at 17:34 -0500, Wei Weng wrote: > On Tue, 2006-12-05 at 15:56 -0500, Wei Weng wrote: > > I have a table that has roughly 200,000 entries and many columns. >... > I think I have discovered the reason for why the query runs so slow. The > original query has an ORDER BY Field1 claus

Re: [GENERAL] Anything I can do to speed up this query?

2006-12-06 Thread Wei Weng
On Tue, 2006-12-05 at 15:56 -0500, Wei Weng wrote: > I have a table that has roughly 200,000 entries and many columns. > > The query is very simple: > > SELECT Field1, Field2, Field3... FieldN FROM TargetTable; > > TargetTable has an index that is Field1. > I think I have discovered the reason

Re: [GENERAL] Anything I can do to speed up this query?

2006-12-06 Thread Richard Huxton
Wei Weng wrote: I have a table that has roughly 200,000 entries and many columns. The query is very simple: SELECT Field1, Field2, Field3... FieldN FROM TargetTable; TargetTable has an index that is Field1. The thing is on this machine with 1Gig Ram, the above query still takes about 20 secon

Re: [GENERAL] Anything I can do to speed up this query?

2006-12-05 Thread Ragnar
On þri, 2006-12-05 at 15:56 -0500, Wei Weng wrote: > I have a table that has roughly 200,000 entries and many columns. > > SELECT Field1, Field2, Field3... FieldN FROM TargetTable; > The thing is on this machine with 1Gig Ram, the above query still takes > about 20 seconds to finish. And I need i

Re: [GENERAL] Anything I can do to speed up this query?

2006-12-05 Thread Ron Johnson
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 12/05/06 14:56, Wei Weng wrote: > I have a table that has roughly 200,000 entries and many columns. > > The query is very simple: > > SELECT Field1, Field2, Field3... FieldN FROM TargetTable; > > TargetTable has an index that is Field1. > > The

Re: [GENERAL] Anything I can do to speed up this query?

2006-12-05 Thread Alexander Staubo
On Dec 5, 2006, at 21:56 , Wei Weng wrote: I have a table that has roughly 200,000 entries and many columns. The query is very simple: SELECT Field1, Field2, Field3... FieldN FROM TargetTable; This is the very definition of a sequential scan: you're reading 200,000 rows from that table, an

Re: [GENERAL] Anything I can do to speed up this query?

2006-12-05 Thread Scott Marlowe
On Tue, 2006-12-05 at 14:56, Wei Weng wrote: > I have a table that has roughly 200,000 entries and many columns. > > The query is very simple: > > SELECT Field1, Field2, Field3... FieldN FROM TargetTable; > > TargetTable has an index that is Field1. > > The thing is on this machine with 1Gig Ra

Re: [GENERAL] Anything I can do to speed up this query?

2006-12-05 Thread Wei Weng
I am running this in the same machine as the database though. Thanks On Tue, 2006-12-05 at 16:02 -0500, Jan de Visser wrote: > On Tuesday 05 December 2006 3:56 pm, Wei Weng wrote: > > I have a table that has roughly 200,000 entries and many columns. > > > > The query is very simple: > > > > SELE

Re: [GENERAL] Anything I can do to speed up this query?

2006-12-05 Thread Wei Weng
Forgot to mention the version I am using. PostgreSQL 7.4.13 Thanks On Tue, 2006-12-05 at 15:56 -0500, Wei Weng wrote: > I have a table that has roughly 200,000 entries and many columns. > > The query is very simple: > > SELECT Field1, Field2, Field3... FieldN FROM TargetTable; > > TargetTabl

Re: [GENERAL] Anything I can do to speed up this query?

2006-12-05 Thread Jan de Visser
On Tuesday 05 December 2006 3:56 pm, Wei Weng wrote: > I have a table that has roughly 200,000 entries and many columns. > > The query is very simple: > > SELECT Field1, Field2, Field3... FieldN FROM TargetTable; > > TargetTable has an index that is Field1. > > The thing is on this machine with 1Gi

[GENERAL] Anything I can do to speed up this query?

2006-12-05 Thread Wei Weng
I have a table that has roughly 200,000 entries and many columns. The query is very simple: SELECT Field1, Field2, Field3... FieldN FROM TargetTable; TargetTable has an index that is Field1. The thing is on this machine with 1Gig Ram, the above query still takes about 20 seconds to finish. And