Skip site navigation (1) Skip section navigation (2)

Should i use Limit & Offset in Sql or cursors to handle large data

From: Ascarabina <ascarabina(at)gmail(dot)com>
To: pgsql-novice(at)postgresql(dot)org
Subject: Should i use Limit & Offset in Sql or cursors to handle large data
Date: 2012-02-02 18:56:02
Message-ID: 4F2ADC42.5070902@gmail.com (view raw or flat)
Thread:
Lists: pgsql-novice
Hello,
Just out of curiosity :  On Postgresql ( > 9.0 ) , if i had to iterate 
over the table with 3 million records , which method uses less memory & 
cpu usage but faster : Using cursor and fetch or just plain SQL with 
offset and limit ? And why is the difference ?

Thanks.


pgsql-novice by date

Next:From: Kevin DuffyDate: 2012-02-03 03:08:51
Subject: postgresql on Fedora 16
Previous:From: WindybellDate: 2012-02-01 11:28:35
Subject: Re: PostgreSQL - Debian - Processes: postgres: writer process, etc.

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group