Re: query help/sugestions

Поиск
Список
Период
Сортировка
От Roberto Mello
Тема Re: query help/sugestions
Дата
Msg-id 20030208163855.GD25254@cc.usu.edu
обсуждение исходный текст
Ответ на Re: query help/sugestions  ("John Cavacas" <oogly@rogers.com>)
Список pgsql-sql
On Sat, Feb 08, 2003 at 02:33:58AM -0500, John Cavacas wrote:
> 
> CREATE VIEW viewcontent
> (id,statusid,title,datecreated,lastmodified,userid,username,catid,catego
> ry,intro,body,typeid,content,commentcount) as
> 
> SELECT a.id as id,
>        a.status as statusid,
>        a.title as title,
>        a.datecreated as datecreated,
...

Have you run the query above under EXPLAIN to see what kind of execution
plan you're getting?

> Is creating the view a good idea in terms of performance? This is a
> general query, I would for example not include the main body of the text
> needed for the front page listing.

The performance will be as good as your underlying query is. The VIEW is
just an "alias" if you will, and they are generally a good idea.
-Roberto

P.S.: Please trim the messages to which you respond. For this message you
left dozens of lines of cruft hanging after your message (replying at the
top is a bad idea too, because you lose context). Not only this is bad for
the archives, but it wastes bandwidth and shows lack of respect for
other people's inbox.

-- 
+----|        Roberto Mello   -    http://www.brasileiro.net/  |------+
+       Computer Science Graduate Student, Utah State University      +
+       USU Free Software & GNU/Linux Club - http://fslc.usu.edu/     +
Boss spelled backwards is "double-SOB"


В списке pgsql-sql по дате отправления:

Предыдущее
От: "John Cavacas"
Дата:
Сообщение: Re: query help/sugestions
Следующее
От: "John Cavacas"
Дата:
Сообщение: Re: query help/sugestions