All, Any suggestions on a Postgresql equivalent to
the following DB2 sql query:
SELECT * FROM (SELECT
ID,NAME,CITY,STATE,PROGRAM,CUST_NAME,CUST_ID,ROWNUMBER()
OVER (ORDER BY ID ASC) AS RN FROM
MERCHANT_BROWSER_VIEW WHERE CUST_ID = 'A51B8CA2' ) AS
RESULT WHERE RN BETWEEN 1 AND 20
TIA, Happy Holid
pgsql-sql,
We are porting a database from IBM DB2 to PostgreSQL.
In several related scripts, there is a SELECT
statement that never completes in Postgres but
completes in a few seconds using DB2, for example:
Table row count:
SELECT count(*) FROM tableX;
112671
SELECT count(*) from tableY;
31