Re: best way to test new index?

Lists: pgsql-hackers
From: Yves Weißig <weissig(at)rbg(dot)informatik(dot)tu-darmstadt(dot)de>
To: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: best way to test new index?
Date: 2011-04-21 18:34:54
Message-ID: 4DB078CE.9090800@rbg.informatik.tu-darmstadt.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Hello pgsql-hackers,

what is the best way to test a new developed index structure?

Greets, Yves


From: "Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov>
To: "pgsql-hackers" <pgsql-hackers(at)postgresql(dot)org>, <weissig(at)rbg(dot)informatik(dot)tu-darmstadt(dot)de>
Subject: Re: best way to test new index?
Date: 2011-04-21 18:56:50
Message-ID: 4DB037A2020000250003CB65@gw.wicourts.gov
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Yves Weißig<weissig(at)rbg(dot)informatik(dot)tu-darmstadt(dot)de> wrote:

> what is the best way to test a new developed index structure?

Are you talking about a new AM (like btree, hash, GiST, or GIN)?

-Kevin


From: Yves Weißig <weissig(at)rbg(dot)informatik(dot)tu-darmstadt(dot)de>
To: Kevin Grittner <Kevin(dot)Grittner(at)wicourts(dot)gov>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: best way to test new index?
Date: 2011-04-21 19:02:15
Message-ID: 4DB07F37.4090508@rbg.informatik.tu-darmstadt.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Yes I do!

Am 21.04.2011 20:56, schrieb Kevin Grittner:
> Yves Weißig<weissig(at)rbg(dot)informatik(dot)tu-darmstadt(dot)de> wrote:
>
>> what is the best way to test a new developed index structure?
>
> Are you talking about a new AM (like btree, hash, GiST, or GIN)?
>
> -Kevin
>


From: "Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov>
To: <weissig(at)rbg(dot)informatik(dot)tu-darmstadt(dot)de>
Cc: "pgsql-hackers" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: best way to test new index?
Date: 2011-04-21 20:28:28
Message-ID: 4DB04D1C020000250003CB73@gw.wicourts.gov
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Yves Weißig<weissig(at)rbg(dot)informatik(dot)tu-darmstadt(dot)de> wrote:
> Am 21.04.2011 20:56, schrieb Kevin Grittner:
>> Yves Weißig<weissig(at)rbg(dot)informatik(dot)tu-darmstadt(dot)de> wrote:
>>
>>> what is the best way to test a new developed index structure?
>>
>> Are you talking about a new AM (like btree, hash, GiST, or GIN)?
>
> Yes I do!

The tests are going to depend somewhat on what the index is intended
to do.

That said, I would start by making sure that basic things like
CREATE INDEX and DROP INDEX work. Then I would test that INSERT,
UPDATE, and DELETE do the right things with the index. Then I would
make sure that vacuum did the right thing. Then I would make sure
that the optimizer was doing a reasonable job of knowing when it was
usable and what it cost, so that it would be chosen when
appropriate. Once everything seemed to be behaving I would
benchmark it against the reasonable alternatives.

-Kevin


From: Josh Berkus <josh(at)agliodbs(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Re: best way to test new index?
Date: 2011-04-21 23:26:45
Message-ID: 4DB0BD35.1070600@agliodbs.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On 4/21/11 1:28 PM, Kevin Grittner wrote:
> That said, I would start by making sure that basic things like
> CREATE INDEX and DROP INDEX work. Then I would test that INSERT,
> UPDATE, and DELETE do the right things with the index. Then I would
> make sure that vacuum did the right thing. Then I would make sure
> that the optimizer was doing a reasonable job of knowing when it was
> usable and what it cost, so that it would be chosen when
> appropriate. Once everything seemed to be behaving I would
> benchmark it against the reasonable alternatives.

... And then finally, kill -9 the database server while updating the
index to test crash-safeness.

--
Josh Berkus
PostgreSQL Experts Inc.
http://pgexperts.com


From: Yves Weißig <weissig(at)rbg(dot)informatik(dot)tu-darmstadt(dot)de>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Re: best way to test new index?
Date: 2011-04-22 07:55:34
Message-ID: 4DB13476.7030703@rbg.informatik.tu-darmstadt.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Ok, but I thought more like an automated test, or a test which checks if
the interface is correctly implemented. By the way, tho broaden the
topic, what would be the best way to debug in pg? elog? asserts?

Am 22.04.2011 01:26, schrieb Josh Berkus:
> On 4/21/11 1:28 PM, Kevin Grittner wrote:
>> That said, I would start by making sure that basic things like
>> CREATE INDEX and DROP INDEX work. Then I would test that INSERT,
>> UPDATE, and DELETE do the right things with the index. Then I would
>> make sure that vacuum did the right thing. Then I would make sure
>> that the optimizer was doing a reasonable job of knowing when it was
>> usable and what it cost, so that it would be chosen when
>> appropriate. Once everything seemed to be behaving I would
>> benchmark it against the reasonable alternatives.
>
> ... And then finally, kill -9 the database server while updating the
> index to test crash-safeness.
>