Hi, Friends
I have a table with 2 lakh records (one text field, one int4 field, and a Gemetry field). When I was executing the query using Binary cursors, It was taking nearly 35 seconds. I am executing my query as follows
BEGIN;
DECLARE MyCursor BINARY CURSOR for select Field1,Field2(G eometry Field) from Table;
Fetch All into MyCursor;
Here I have Just write the loop from 1 to 200000 with out doing any thing like below.
for (int i=0;i<PQntuples (res);i++)
{
for (int j=0;j<PQnfields (res);j++)
{
}
}
close MyCursor;
END;
I have also tried various index mechanisms also. But I haven't get any Performence. Can I use the Indexes To get Query results Fast?
Can anybody tell me how to Execute The Queries fastly.
ThanQ
I have a table with 2 lakh records (one text field, one int4 field, and a Gemetry field). When I was executing the query using Binary cursors, It was taking nearly 35 seconds. I am executing my query as follows
BEGIN;
DECLARE MyCursor BINARY CURSOR for select Field1,Field2(G eometry Field) from Table;
Fetch All into MyCursor;
Here I have Just write the loop from 1 to 200000 with out doing any thing like below.
for (int i=0;i<PQntuples (res);i++)
{
for (int j=0;j<PQnfields (res);j++)
{
}
}
close MyCursor;
END;
I have also tried various index mechanisms also. But I haven't get any Performence. Can I use the Indexes To get Query results Fast?
Can anybody tell me how to Execute The Queries fastly.
ThanQ
Comment