Skip site navigation (1) Skip section navigation (2)

Re: Limit clause not using index

From: "Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov>
To: <john(at)arbash-meinel(dot)com>, <tobias(at)nordicbet(dot)com>
Cc: <yves(dot)vindevogel(at)implements(dot)be>,<pgsql-performance(at)postgresql(dot)org>
Subject: Re: Limit clause not using index
Date: 2005-06-21 21:11:40
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-performance
I just tried this on 8.0.3.  A query which runs very fast through an
index on a 25 million row table blocked when I dropped the index within
a database transaction.  As soon as I rolled back the database
transactiton, the query completed, the index appears fine, and the query
runs fast, as usual.
So, it looks like this is right except for the assertion that the index
is still available for other queries.
>>> Tobias Brox <tobias(at)nordicbet(dot)com> 06/21/05 2:46 PM >>>
[John A Meinel - Tue at 10:14:24AM -0500]
> I believe if you drop the indexes inside a transaction, they will
> be there for other queries, and if you rollback instead of commit, you
> won't lose anything.

Has anyone tested this?

(sorry, I only have the production database to play with at the moment,
and I don't think I should play with it ;-)

Tobias Brox, Beijing

---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
       subscribe-nomail command to majordomo(at)postgresql(dot)org so that your
       message can get through to the mailing list cleanly

pgsql-performance by date

Next:From: Tom LaneDate: 2005-06-21 21:20:07
Subject: Re: Limit clause not using index
Previous:From: Michael FuhrDate: 2005-06-21 21:08:19
Subject: Re: Limit clause not using index

Privacy Policy | About PostgreSQL
Copyright © 1996-2018 The PostgreSQL Global Development Group