Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.databases.postgresql > #603

Re: Returning a table in SQL

From "AP" <unixpronospam@verizon.net>
Newsgroups comp.databases.postgresql
Subject Re: Returning a table in SQL
Date 2014-09-04 02:57 -0400
Organization Netfront http://www.netfront.net/
Message-ID <lu92hs$3ft$1@adenine.netfront.net> (permalink)
References (1 earlier) <c644cpF2g32U1@mid.individual.net> <ltlfj0$1702$1@adenine.netfront.net> <c691fnFahj8U1@mid.individual.net> <lu15ml$qq8$1@adenine.netfront.net> <lu1jc2$1j5$1@gonzo.reversiblemaps.ath.cx>

Show all headers | View raw


That a good, if obvious, point. Obvious because all indexing and 
optimization would need to happen within whatever query is wrapped into this 
parametrized view. That said, is there a way to build a useful index on a 
record column ? On a record-returning function column ?

And do all queries get same shot at optimization whether they come from 
within a Plpgsql block or a cursor, or from within a SQL function or view ?

"Jasen Betts"  wrote in message 
news:lu1jc2$1j5$1@gonzo.reversiblemaps.ath.cx...

On 2014-09-01, AP <unixpronospam@verizon.net> wrote:
> select * from some_report() gives me one column containing a record. 
> select
> (cr).field1 , (cr1).field2, (cr1).field3 from some_report() cr1 gives 3
> columns - as needed.
>
> Since we are on the subject, is there a downside to such "parametrized
> views" ?

no optimisation for the where clause, or any index for an order by.

-- 
umop apisdn


--- news://freenews.netfront.net/ - complaints: news@netfront.net --- 


---
This email is free from viruses and malware because avast! Antivirus protection is active.
http://www.avast.com


--- news://freenews.netfront.net/ - complaints: news@netfront.net ---

Back to comp.databases.postgresql | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

Returning a table in SQL "AP" <unixpro-nospam@verizon.spam.net> - 2014-08-26 13:39 -0400
  Re: Returning a table in SQL Harry Tuttle <SOZRBLNTLEEE@spammotel.com> - 2014-08-26 21:10 +0200
    Re: Returning a table in SQL Robert Klemme <shortcutter@googlemail.com> - 2014-08-26 22:28 +0200
      Re: Returning a table in SQL Harry Tuttle <SOZRBLNTLEEE@spammotel.com> - 2014-08-26 23:34 +0200
        Re: Returning a table in SQL Robert Klemme <shortcutter@googlemail.com> - 2014-08-27 08:36 +0200
    Re: Returning a table in SQL "AP" <unixpronospam@verizon.net> - 2014-08-27 16:37 -0400
      Re: Returning a table in SQL Harry Tuttle <SOZRBLNTLEEE@spammotel.com> - 2014-08-28 17:51 +0200
        Re: Returning a table in SQL Robert Klemme <shortcutter@googlemail.com> - 2014-08-28 21:45 +0200
        Re: Returning a table in SQL Jasen Betts <jasen@xnet.co.nz> - 2014-08-30 05:45 +0000
        Re: Returning a table in SQL "AP" <unixpronospam@verizon.net> - 2014-09-01 03:02 -0400
          Re: Returning a table in SQL Jasen Betts <jasen@xnet.co.nz> - 2014-09-01 10:56 +0000
            Re: Returning a table in SQL "AP" <unixpronospam@verizon.net> - 2014-09-04 02:57 -0400
              Re: Returning a table in SQL Jasen Betts <jasen@xnet.co.nz> - 2014-09-04 11:21 +0000
  Re: Returning a table in SQL Lennart Jonsson <erik.lennart.jonsson@gmail.com> - 2014-08-27 19:33 +0200

csiph-web