Re: Queries and views

From: Emmanuel SARACCO <esaracco(at)noos(dot)fr>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Queries and views
Date: 2001-10-17 03:34:20
Message-ID: 3BCCFC3C.70805@noos.fr
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

hi,

you can use the EXPLAIN instruction.
"\h EXPLAIN" in psql for help.

bye

David Cana wrote:

> 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.
>
>
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 6: Have you searched our list archives?
>
> http://archives.postgresql.org
>
>
>

--
Emmanuel SARACCO
Email: esaracco(at)noos(dot)fr

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Andrej Falout 2001-10-17 05:23:09 Re: A tool for making console/text data enrty/display screens in C
Previous Message Tom Lane 2001-10-17 03:17:07 Re: User privileges