RE: Cursores Vs Performance

From: Lazaro Rubén García Martinez <lgarciam(at)vnz(dot)uci(dot)cu>
To: ruben avila galindo <ruben2218(at)gmail(dot)com>, "pgsql-es-ayuda(at)postgresql(dot)org" <pgsql-es-ayuda(at)postgresql(dot)org>
Subject: RE: Cursores Vs Performance
Date: 2011-11-17 16:38:39
Message-ID: 294D3D02D5E18D42827B2ECFEADEB688214CEA078E@mx-interno.vnz.uci.cu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-es-ayuda

No lo creo, mira lo que dice en la documentación oficial relacionada a los cursores:

"Rather than executing a whole query at once, it is possible to set up a cursor that encapsulates the query, and then read the query result a few rows at a time. One reason for doing this is to avoid memory overrun when the result contains a large number of rows. (However, PL/pgSQL users do not normally need to worry about that, since FOR loops automatically use a cursor internally to avoid memory problems.) A more interesting usage is to return a reference to a cursor that a function has created, allowing the caller to read the rows. This provides an efficient way to return large row sets from functions."

Saludos.

De: pgsql-es-ayuda-owner(at)postgresql(dot)org [mailto:pgsql-es-ayuda-owner(at)postgresql(dot)org] En nombre de ruben avila galindo
Enviado el: jueves, 17 de noviembre de 2011 11:42
Para: pgsql-es-ayuda(at)postgresql(dot)org
Asunto: [pgsql-es-ayuda] Cursores Vs Performance

Hola estuve leyendo que usar cursores demanda mucho uso de procesador y memoria cuando ejecutes Lotes de Informacion y si es mas operaciones en memoria
queria saber si es cierto eso y en caso nomas se conviene usar CURSOR en Postgresql.

Saludos

Ruben Avila G

In response to

Responses

Browse pgsql-es-ayuda by date

  From Date Subject
Next Message Kernel 2011-11-17 16:39:51 Re: extraer las horas o minutos totales de un interval
Previous Message Miguel Angel Hernandez Moreno 2011-11-17 16:35:34 Re: ERROR Interval