By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,998 Members | 2,903 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,998 IT Pros & Developers. It's quick & easy.

How To Execue Queris Fastly

P: 18
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(Geometry 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
Apr 13 '07 #1
Share this Question
Share on Google+
1 Reply


Expert 100+
P: 534
Please follow the Posting Guidelines when you post into forum.
Apr 13 '07 #2

Post your reply

Sign in to post your reply or Sign up for a free account.