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
Views: Raw Message | Whole Thread | Download mbox | Resend email
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.

Browse pgsql-novice by date

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