[PERFORM] Stored proc and optimizer question

2006-02-17 Thread Antal Attila
Hi! I have a question about the query optimizer and the function scan. See the next case: CREATE TABLE a (id SERIAL PRIMARY KEY, userid INT4, col TEXT); CREATE TABLE b (id SERIAL PRIMARY KEY, userid INT4, a_id INT4 REFERENCES a (id), col TEXT); CREATE INDEX idx_a_uid ON a(userid); CREATE I

[PERFORM] Stored proc and optimizer question

2006-02-15 Thread Antal Attila
Hi! I have a question about the query optimizer and the function scan. See the next case: CREATE TABLE a (id SERIAL PRIMARY KEY, userid INT4, col TEXT); CREATE TABLE b (id SERIAL PRIMARY KEY, userid INT4, a_id INT4 REFERENCES a (id), col TEXT); CREATE INDEX idx_a_uid ON a(userid); CREATE INDEX