Re: [PHP] PostgreSQL query taking a long time

2001-12-22 Thread Papp Gyozo
use EXPLAIN to get more information about how postgres executes this query. I'm not sure about this, but there are some issues with fields of type int8. It may help to cast explicitly the fields involved in join like: WHERE bible.book::int4 = books.id::int4 Ask it the postgres mai

Re: [PHP] PostgreSQL query taking a long time

2001-12-21 Thread Shane Wright
Hi, You dont have the book field in the asv_bible table indexed. Use this to index it CREATE INDEX myindexname ON asv_bible(book); (the primary key fields are ok because PostgreSQL creates a unique index to implement the PRIMARY KEY constraint). Hope that helps :) -- Shane > I have a