473,765 Members | 2,066 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How To Execue Queris Fastly

18 New Member
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
Apr 13 '07 #1
1 2001
michaelb
534 Recognized Expert Contributor
Please follow the Posting Guidelines when you post into forum.
Apr 13 '07 #2

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

Similar topics

8
9139
by: Giulio | last post by:
I'm doing a class who takes in constructor a vector<int> keeps and makes some statistic on the vector whitout modifiing it. I would like not to make a copy of the vector for the class. to let the full process be faster a smaller in memory. I tried to pass the vector by reference using * but that operator doesn't exist. my ask is: how the vector are passed to functions?
0
2184
by: Carl | last post by:
Hi, I have found a way to map attributes (columns) to column headings. But this runs really slow. Is there a way to improve it? Thanks, Carl <?xml version="1.0" encoding="utf-8" ?> <?xml-stylesheet type="text/xsl" href="stylesheet.xslt"?>
1
1273
by: Hi5 | last post by:
Hi, I an new to Access,I was trying to make some queries from the 6 tables, which are holding all data in my DB. but there seems to be a problem with access understanding of Primary /foregn keys, any Idea how to use access 2000 and make a successful query? Many thanks
0
1199
by: SamIAm | last post by:
Hi There I have a usercontrol that gets some code using a server.execute. I have included it in my webpage and it seems to work fine until I do a PostBack. Anybody had this problem before? S
1
3009
by: Uzytkownik | last post by:
I've some function: function show($id) { $title = $text = $date = $nick = NULL; $stmt = $this->base->stmt_init(); $stmt->prepare("SELECT title,text,datetime,nick FROM posts LEFT JOIN authors ON authors.id=posts.id WHERE posts.id=?"); $stmt->bind_param('i', $id); $stmt->bind_result($title, $text, $date, $nick); $stmt->execute(); $stmt->fetch(); return array('title'=>$title, 'text'=>$text, 'date'=>$date, 'author'=>$nick, 'tags' =>...
1
3549
by: WaZaA | last post by:
i am using dev c++ and i would like to make queries in mysql database.are there any libraries i could possibly find ?
1
2023
by: gouse | last post by:
Hello Friends, In a Table I am inserting more than 50,000 Records one by one. It was taking a lot of time . Is it There any good approach/solution for inserting records more than 50,000 one by one in a fast manner. I have the same Problem in Updating of Records also. Please help me regarding this issue. I am Using VC++ application As a Front End and libpq 'C' interface as a interface between my application and PostgreSQL Backend Database....
0
2825
by: Akrishnamohan | last post by:
Subject:How to Run Action Queries in VBA-TERADATA?? Message: hi, Im trying in exceuting an action queris in Vba. Im able to connect to teradata. after connection,im imporitng through text pad the query that i wabt to run. the problem is the text pad consists of many action queris. the code im using is shown below.
0
800
by: ajayvaram | last post by:
Hi, Example XML: <Data> <Plan StartDate="2008-01-01" Age="65" Frequency="12" /> ... <Customer Id="1" DateOfBirth="1952-06-08" Sex="Female" Age="65" /> -------<Fund FundName="002-066" PctInvested="100" /> ...
0
9404
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10007
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9835
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8833
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5277
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5423
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3926
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3532
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2806
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.