Re: [SQL] Question about indexing!

2001-10-03 Thread Stephan Szabo
On Wed, 3 Oct 2001, [euc-kr] Jeong Jaeick, Á¤ÀçÀÍ wrote: > pgsql_bbs table has about 15,000 rows! > And almost of them are satify (topic='qna' and deleted<2) condition. Ah, so it's getting it wrong. It *shouldn't* be using that index. :( [Index scans over most of the table is slower than the s

Re: [SQL] Question about indexing!

2001-10-03 Thread Jeong Jaeick, 정재익
pgsql_bbs table has about 15,000 rows! And almost of them are satify (topic='qna' and deleted<2) condition. This explain result have a large cost. I want to low this query cost. Thanks for your concern :-) >> select * from pgsql_bbs where topic = 'qna' and deleted < 2 >>order by gid des

Re: [SQL] Question about indexing!

2001-10-02 Thread Stephan Szabo
On Tue, 2 Oct 2001, [euc-kr] Jeong Jaeick, Á¤ÀçÀÍ wrote: > select * from pgsql_bbs where topic = 'qna' and deleted < 2 >order by gid desc, pos asc limit 20, 0; > > But this query is not using index! > > The next is result of explain of this query: > > dsn=# explain select * from pgsq

[SQL] Question about indexing!

2001-10-02 Thread Jeong Jaeick, 정재익
I made the table like this; dsn=# \d pgsql_bbs Table "pgsql_bbs" Attribute | Type |Modifier -+-+- id | integer | not null default nextval('pgsq