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

From: Ron Johnson <ron(dot)l(dot)johnson(at)cox(dot)net>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Anything I can do to speed up this query?
Date: 2006-12-07 02:23:08
Message-ID: 45777B0C.2060903@cox.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

-----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.
>
> So the query looks like this:
>
> SELECT Field1, Field2, Field3... FieldN FROM TargetTable ORDER BY Field1
> DESC;
>
> What is the effective way to optimize this query(or to optimize the
> system) to run a little faster than it does now?
>
> Thanks and I really appreciate all the helps I've gotten so far.

Is the index ASC or DESC?

- --
Ron Johnson, Jr.
Jefferson LA USA

Is "common sense" really valid?
For example, it is "common sense" to white-power racists that
whites are superior to blacks, and that those with brown skins
are mud people.
However, that "common sense" is obviously wrong.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (GNU/Linux)

iD8DBQFFd3sLS9HxQb37XmcRAttuAKCnSEXoXcK+CCCaa3yIX+FXS/NqtwCgzlZS
IQ4C7hbsCXiFLGkhrPQGGUA=
=4z9T
-----END PGP SIGNATURE-----

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Christopher Browne 2006-12-07 02:28:07 Re: VACUUM and transactions in different databases
Previous Message sasan3@gmail.com 2006-12-07 02:22:54 can this be done in one SQL selcet statement?!