Josh Berkus [EMAIL PROTECTED]
Gaetano,
SELECT * from user_logs where id_user in (
10943, 10942, 10934, 10927, 10910, 10909
);
[SNIPPED]
Why the planner or the executor ( I don't know ) do not follow
the same strategy ?
It is, actually, according to the query plan.
Can
Josh Berkus [EMAIL PROTECTED]
Gaetano,
QUERY PLAN
Hash Join (cost=265.64..32000.76 rows=40612 width=263) (actual
time=11074.21..11134.28 rows=10 loops=1)
Hash Cond: (outer.id_user = inner.id_user)
- Seq Scan on user_logs ul (cost=0.00..24932.65 rows=1258965
width=48)
From: Fernando Papa [EMAIL PROTECTED]
AND upper(cont_publicacion.generar_Vainilla) = 'S'
Filter: ((upper((generar_vainilla)::text) = 'S'::text) AND
(fecha_publicacion = (subplan)))
using a functional index on this field should help
create index idx_generar_vainilla_ci on cont_publicacion (