Craig Ringer wrote:
it's a *bit* of a tiny use case.
It certainly is.
Jay
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
Mike Christensen writes:
> BTW, this table (RecipeMetadata) will only ever be used in a join. I
> will never query it directly. But I'll query Recipes and join in
> RecipeMetadata.
In that case possibly you want the join key to be the index payload.
regards, tom lane
-
On Thu, Dec 15, 2011 at 6:00 AM, Craig Ringer wrote:
> On 12/15/2011 03:53 PM, Alban Hertroys wrote:
>>
>> Correct, but...
>> That's not a particularly useful index to create. That index just contains
>> values of true where the associated column equals true - you're storing the
>> same informatio
On 12/15/2011 03:53 PM, Alban Hertroys wrote:
Correct, but...
That's not a particularly useful index to create. That index just contains
values of true where the associated column equals true - you're storing the
same information twice.
It could be very handy if you have an extremely high selec
Mike Christensen wrote:
> For the boolean column Foo in Table1, if I want to index all values of
> TRUE, is this syntax correct?
>
> CREATE INDEX IDX_MyIndex ON Table1(Foo) WHERE Foo;
Yes, that is correct.
Yours,
Laurenz Albe
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org
On 15 Dec 2011, at 5:43, Mike Christensen wrote:
> For the boolean column Foo in Table1, if I want to index all values of
> TRUE, is this syntax correct?
>
> CREATE INDEX IDX_MyIndex ON Table1(Foo) WHERE Foo;
>
> The query:
>
> SELECT * FROM Table1 WHERE Foo;
>
> should use the index, and:
>
On Wed, Dec 14, 2011 at 9:54 PM, Mike Christensen wrote:
>> For the boolean column Foo in Table1, if I want to index all values of
>> TRUE, is this syntax correct?
>>
>> CREATE INDEX IDX_MyIndex ON Table1(Foo) WHERE Foo;
>>
>> The query:
>>
>> SELECT * FROM Table1 WHERE Foo;
>>
>> should use the i
> For the boolean column Foo in Table1, if I want to index all values of
> TRUE, is this syntax correct?
>
> CREATE INDEX IDX_MyIndex ON Table1(Foo) WHERE Foo;
>
> The query:
>
> SELECT * FROM Table1 WHERE Foo;
>
> should use the index, and:
>
> SELECT * FROM Table1 WHERE NOT Foo;
>
> should not, c
For the boolean column Foo in Table1, if I want to index all values of
TRUE, is this syntax correct?
CREATE INDEX IDX_MyIndex ON Table1(Foo) WHERE Foo;
The query:
SELECT * FROM Table1 WHERE Foo;
should use the index, and:
SELECT * FROM Table1 WHERE NOT Foo;
should not, correct?
I just want t