Re: [PERFORM] 225 times slower

2004-04-22 Thread Tom Lane
=?ISO-8859-1?Q?Pailloncy_Jean-G=E9rard?= [EMAIL PROTECTED] writes: dps=# explain analyze SELECT rec_id FROM url WHERE crc32!=0 AND crc32=419903683 AND status IN (200,304,206) ORDER BY rec_id LIMIT 1; QUERY PLAN

Re: [PERFORM] 225 times slower

2004-04-22 Thread Pailloncy Jean-Gérard
The planner is guessing that scanning in rec_id order will produce a matching row fairly quickly (sooner than selecting all the matching rows and sorting them would do). It's wrong in this case, but I'm not sure it could do better without very detailed cross-column statistics. Am I right to

Re: [PERFORM] 225 times slower

2004-04-20 Thread Pailloncy Jean-Gérard
Hi, I apologize for the mistake. So, I dump the database, I reload it then VACUUM ANALYZE. For each statement: I then quit postgres, start it, execute one command, then quit. Le 14 avr. 04, à 14:39, Pailloncy Jean-Gérard a écrit : dps=# explain analyze SELECT rec_id FROM url WHERE crc32!=0