Hi List,
I want to run a Select Query on a table. But i dont want the query to pick a
index defined on that table.
So can i instruct the planner not to pick that index.
--
Regards
Gauri
On Fri, Feb 16, 2007 at 06:26:51PM +0530, Gauri Kanekar wrote:
I want to run a Select Query on a table. But i dont want the query to pick a
index defined on that table.
So can i instruct the planner not to pick that index.
Why don't you want the planner to use the index? Is there a specific
I want the planner to ignore a specific index.
I am testing some query output. For that purpose i dont want the index.
I that possible to ignore a index by the planner.
On 2/16/07, Michael Fuhr [EMAIL PROTECTED] wrote:
On Fri, Feb 16, 2007 at 06:26:51PM +0530, Gauri Kanekar wrote:
I want to
Gauri Kanekar escribió:
I want the planner to ignore a specific index.
I am testing some query output. For that purpose i dont want the index.
I that possible to ignore a index by the planner.
Sure:
BEGIN
DROP INDEX foo
SELECT
ROLLBACK
--
Alvaro Herrera
Gauri Kanekar [EMAIL PROTECTED] writes:
I want the planner to ignore a specific index.
I am testing some query output. For that purpose i dont want the index.
I that possible to ignore a index by the planner.
begin;
drop index soandso;
explain analyze ...;
This is very similar to the problem I posted to this list
yesterday. Apparently, if you append an empty string to the column
data in your WHERE clause it will force the planer to treat it as a
filter and not an index cond. It's extremely ugly, but this method
doesn't seem to be anymore
On Fri, 2007-02-16 at 20:01 +0530, Gauri Kanekar wrote:
I want the planner to ignore a specific index.
I am testing some query output. For that purpose i dont want the
index.
I that possible to ignore a index by the planner.
If the indexed field is an intger, add 0 to it.
--
Brad
On Fri, Feb 16, 2007 at 01:27:46PM -0500, Brad Nicholson wrote:
If the indexed field is an intger, add 0 to it.
Won't that also invalidate the statistics?
/* Steinar */
--
Homepage: http://www.sesse.net/
---(end of broadcast)---
TIP 6: explain
Note the DROP INDEX will acquire exclusive lock on the table, so this
might not be the greatest thing to do in a production environment.
In PG 8.2 and up there is a sneakier way to do it that won't acquire
any more lock than the statement-under-test does:
begin;
update pg_index
George Pavlov [EMAIL PROTECTED] writes:
In PG 8.2 and up there is a sneakier way to do it that won't acquire
any more lock than the statement-under-test does:
begin;
update pg_index set indisvalid = false
where indexrelid = 'soandso'::regclass;
explain analyze ...;
rollback;
this really
10 matches
Mail list logo