Hello, I have a problem with this simple query : explain select * from ref_artikel a where a.artnr in ( 351275 , 351346 , 293082 ) LIMIT 20 OFFSET 0 ; QUERY PLAN
---------------------------------------------------------------------------- ------------------------------------------------------ Limit (cost=0.00..9.06 rows=3 width=299) -> Index Scan using ref_artikel_pkey, ref_artikel_pkey, \ ref_artikel_pkey on ref_artikel a (cost=0.00..9.06 rows=3 width=299) Index Cond: ((artnr = 351275) OR (artnr = 351346) OR (artnr = 293082)) (3 rows) Is it okay , that the word ref_artikel_pkey will be repeated for each condition ? How can i optimize this, i have a number of up to 3000 "artnr" cond. to check for equality ( and more tables joined over this query which i left away for better understanding ) , is a "(x=1) or (x=2)..." faster than "x in 1,2... " at this large number of checks ? Maybe this is the hash-joined bug marked for this 7.4 postgresql.... I consider upgrading to 7.41 on another testing server.... Thx for ideas, Andre ---------------------------(end of broadcast)--------------------------- TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]