Queries and views

From: "David Cana" <david(at)cherrytel(dot)com>
To: <pgsql-general(at)postgresql(dot)org>
Subject: Queries and views
Date: 2001-10-16 12:28:13
Message-ID: 003901c1563e$07296900$0864a8c0@cherrytel.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hello!

I have got a view like:

create view consulta_material as
select
material.clave as clave,
referencia,
sede.nombre_es as nombre_sede, clave_sede,
soporte.nombre_es as nombre_soporte, clave_soporte,
area_materiales.nombre_es as nombre_area_materiales,
clave_area_materia
autor,
titulo,
descripcion,
fecha_intro, fecha_modificacion

from material, sede, soporte, area_materiales

where (material.clave_sede = sede.clave)
and (material.clave_soporte = soporte.clave)
and (material.clave_area_materiales = area_materiales.clave);

I´d like to know the performance difference between...

select * from consulta_material where clave=1;

And...

select
material.clave as clave,
referencia,
sede.nombre_es as nombre_sede, clave_sede,
soporte.nombre_es as nombre_soporte, clave_soporte,
area_materiales.nombre_es as nombre_area_materiales,
clave_area_materia
autor,
titulo,
descripcion,
fecha_intro, fecha_modificacion

from material, sede, soporte, area_materiales

where (material.clave_sede = sede.clave)
and (material.clave_soporte = soporte.clave)
and (material.clave_area_materiales = area_materiales.clave)
and (material.clave=1);

How can I measure SQL queries and views?

Thanks.

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Jim Buttafuoco 2001-10-16 12:28:39 pg_views view doesn't work
Previous Message postgresql 2001-10-16 12:27:49 Re: connecting to a windows application, visual basic