Received: from localhost (maia-1.hub.org [200.46.204.191]) by postgresql.org (Postfix) with ESMTP id 7A8E49FBA2F for ; Thu, 31 May 2007 04:46:44 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.191]) (amavisd-maia, port 10024) with ESMTP id 57025-08 for ; Thu, 31 May 2007 04:46:40 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.5 Received: from web52711.mail.re2.yahoo.com (web52711.mail.re2.yahoo.com [206.190.48.234]) by postgresql.org (Postfix) with SMTP id 57CE79FB6D4 for ; Thu, 31 May 2007 04:46:40 -0300 (ADT) Received: (qmail 88024 invoked by uid 60001); 31 May 2007 07:46:39 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:MIME-Version:Content-Type:Message-ID; b=P7zTxi5CHU8+UnrGKxjPo6Htm9DOfhLq7lN7jhEFa/EKePs7IqdMIGPylyI5IQyllycbJyV4Gqf5iWysJMfHk7k25+M1zz25DebEBcY+fCnLrbDn0VZToeMwgjcIW+ExJVcaYhn7kjmGpR2npvHToq5bHq4u5xWrD/xB3JXCJE0=; X-YMail-OSG: vCdwh2cVM1nzW_QM_1e05q_jSTS8Xir5wTPjQbrXavtcF3CZbGUYe7HRQBWhPQ.Vgg7pCi6EBNeOva514ZA6ntDtLLZvQ3d_KTiMBesYVK23878JdIm6fX.DxgL87HbncavEKuwgb0Y7doknBhy3mYT40w-- Received: from [195.168.227.227] by web52711.mail.re2.yahoo.com via HTTP; Thu, 31 May 2007 00:46:39 PDT X-Mailer: YahooMailRC/651.23.1 YahooMailWebService/0.7.41.14 Date: Thu, 31 May 2007 00:46:38 -0700 (PDT) From: Trigve Siver Subject: Re: slow query execution To: pgsql-sql@postgresql.org MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="0-1501716285-1180597598=:85849" Message-ID: <116998.85849.qm@web52711.mail.re2.yahoo.com> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=2.058 tagged_above=0 required=5 tests=AWL=0.927, BAYES_00=-2.599, DNS_FROM_RFC_ABUSE=0.2, DNS_FROM_RFC_POST=1.708, DNS_FROM_RFC_WHOIS=1.447, HTML_30_40=0.374, HTML_MESSAGE=0.001 X-Spam-Level: ** X-Archive-Number: 200705/204 X-Sequence-Number: 28484 --0-1501716285-1180597598=:85849 Content-Type: text/plain; charset=ascii Hi, thanks for reply No, I'm working with c++ and libpqxx (pgsql c++ binding). I'm using Win32 Listview control with LS_OWNERDATA style. I can use std::map to map row_number to ID field but then I must fetch all records from that table. This could be ineffective when table has about 10.000+ records and user want to view/search only first 100 records. thanks Trigve ----- Original Message ---- From: Bart Degryse To: pgsql-sql@postgresql.org Sent: Thursday, May 31, 2007 9:24:04 AM Subject: Re: [SQL] slow query execution Am I right in assuming that you're working on a VB application with a ListView AxtiveX Control in it? If so consider putting the value of the ID field of your table in the Tag Property of each item in your listview. By looping over all items in your listview you can then check the property for certain values and adjust other properties as required (eg highlight them). Alternatively if you're working with ado you can store the records bookmark in the tag property. That's particulary handy when you want to look up information in a recordset when clicking on an item in the listview. >>> Trigve Siver 2007-05-30 21:11 >>> >----- Original Message ---- >From: Richard Huxton >To: Trigve Siver >Cc: pgsql-sql@postgresql.org >Sent: Wednesday, May 30, 2007 9:05:09 PM >Subject: Re: [SQL] slow query execution > >Trigve Siver wrote: >> >> I seee...when new data will be added to table, then row numbers wouldn''t be valid anymore. >> >> Hmmm...looked like I need to find other solution. > >Try explaining what it is you're trying to achieve, and maybe someone >will be able to suggest a solution. I need to perform search on some query (which is already shown in Listview control) and highlight items that meet search criteria. thanks Trigve ____________________________________________________________________________________ Don't pick lemons. See all the new 2007 cars at Yahoo! Autos. http://autos.yahoo.com/new_cars.html ---------------------------(end of broadcast)--------------------------- TIP 2: Don't 'kill -9' the postmaster ____________________________________________________________________________________ It's here! Your new message! Get new email alerts with the free Yahoo! Toolbar. http://tools.search.yahoo.com/toolbar/features/mail/ --0-1501716285-1180597598=:85849 Content-Type: text/html; charset=ascii
Hi, thanks for reply

No, I'm working with c++ and libpqxx (pgsql c++ binding). I'm using Win32 Listview control with LS_OWNERDATA style. I can use std::map to map row_number to ID field but then I must fetch all records from that table. This could be ineffective when table has about 10.000+ records and user want to view/search only first 100 records.

thanks

Trigve

----- Original Message ----
From: Bart Degryse <Bart.Degryse@indicator.be>
To: pgsql-sql@postgresql.org
Sent: Thursday, May 31, 2007 9:24:04 AM
Subject: Re: [SQL] slow query execution

Am I right in assuming that you're working on a VB application with a ListView AxtiveX Control in it?
If so consider putting the value of the ID field of your table in the Tag Property of each item in your listview.
By looping over all items in your listview you can then check the property for certain values and adjust other properties as required (eg highlight them).
Alternatively if you're working with ado you can store the records bookmark in the tag property. That's particulary handy when you want
to look up information in a recordset when clicking on an item in the listview.

>>> Trigve Siver <trigves@yahoo.com> 2007-05-30 21:11 >>>
>----- Original Message ----
>From: Richard Huxton <dev@archonet.com>
>To: Trigve Siver <trigves@yahoo.com>
>Cc: pgsql-sql@postgresql.org
>Sent: Wednesday, May 30, 2007 9:05:09 PM
>Subject: Re: [SQL] slow query execution
>
>Trigve Siver wrote:
>>
>> I seee...when new data will be added to table, then row numbers wouldn''t be valid anymore.
>>
>> Hmmm...looked like I need to find other solution.
>
>Try explaining what it is you're trying to achieve, and maybe someone
>will be able to suggest a solution.

I need to perform search on some query (which is already shown in Listview control) and
highlight items that meet search criteria.

thanks

Trigve







____________________________________________________________________________________
Don't pick lemons.
See all the new 2007 cars at Yahoo! Autos.
http://autos.yahoo.com/new_cars.html

---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster



Don't get soaked. Take a quick peak at the forecast
with theYahoo! Search weather shortcut. --0-1501716285-1180597598=:85849--