Re: [BUGS] It is a bug in pred_test()! (Was: [SQL] Please, HELP! Why is the query plan so wrong???)

2002-07-13 Thread Tom Lane
Dmitry Tkach <[EMAIL PROTECTED]> writes: > It now looks like a bug in the query planner to me - it seems that it > just doesn't consider indices with predicates for join plans... > I was looking at the source code, and it looks like pred_test() is > responsible for that. Yup. I've applied the

Re: [SQL] Indexes with LIKE

2002-07-13 Thread Stephan Szabo
On Sat, 13 Jul 2002, Julian Scarfe wrote: > I've noticed a difference in behaviour between a server running version 6.x > and one running 7.2.1 in use of indexes with LIKE. > > With an index on foo, > > WHERE foo LIKE 'bar%' > > uses the index (as I would expect it to) on the 6.x box, but uses a

Re: [SQL] pg_restore cannot restore index

2002-07-13 Thread Bruce Momjian
Jie Liang wrote: > On this point, I'd like to ask: > 1. where I can download this new version? > 2. does > pg_restore --index=aa --dbname=test /bjm/x > works also??? OK, the attached patch should allow -I to work in 7.2.X. This will all be fixed in 7.3. > Because > pg_restore --table=mytable

[SQL] Indexes with LIKE

2002-07-13 Thread Julian Scarfe
I've noticed a difference in behaviour between a server running version 6.x and one running 7.2.1 in use of indexes with LIKE. With an index on foo, WHERE foo LIKE 'bar%' uses the index (as I would expect it to) on the 6.x box, but uses a sequential scan (really slow) on the 7.2.1 box. It's pos