Re: [SQL] slow query execution

2007-05-31 Thread Richard Huxton
Trigve Siver wrote: - Original Message From: Richard Huxton <[EMAIL PROTECTED]> To: Trigve Siver <[EMAIL PROTECTED]> Sent: Thursday, May 31, 2007 10:33:40 AM Subject: Re: [SQL] slow query execution So - you want something like: The user runs a query ("all blue things") and that gives

Re: [SQL] ASK about SQL

2007-05-31 Thread Phillip Smith
Yes, you can order it the same as how you've listed in the IN condition, but you need to use the ORDER BY clause... Essentially you just need to pass the same list to both IN and ORDER BY but with some slightly different formatting... SELECT ean FROMicitem WHERE ean IN (4902715720005

Re: [SQL] slow query execution

2007-05-31 Thread Trigve Siver
Thanks for reply, This solution looks promising. I'll look at it and test it and let you know. Thanks once more Trigve - Original Message From: Richard Huxton <[EMAIL PROTECTED]> To: Trigve Siver <[EMAIL PROTECTED]> Sent: Thursday, May 31, 2007 10:33:40 AM Subject: Re: [SQL] slow query

Re: [SQL] slow query execution

2007-05-31 Thread Bart Degryse
Sorry, I don't know C++ enough to help you much. I also don't understand your problem well enough. >>> Trigve Siver <[EMAIL PROTECTED]> 2007-05-31 9:46 >>> 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

Re: [SQL] ASK about SQL

2007-05-31 Thread Phillip Smith
Do you mean you want it to order it in the same order as you've listed them in the IN condition? -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of ali nas Sent: Thursday, 31 May 2007 17:57 To: pgsql-sql@postgresql.org Subject: [SQL] ASK about SQL Dear all,

[SQL] ASK about SQL

2007-05-31 Thread ali nas
Dear all, HELP me PLZ I'm used this SQL command : "" SELECT ean FROM icitem WHERE ean in (4902715720005,4909411012151,4909411010164,4902715688718,4902715731605,4909411008864,4909411010188,4

Re: [SQL] slow query execution

2007-05-31 Thread Trigve Siver
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+ rec

Re: [SQL] slow query execution

2007-05-31 Thread Bart Degryse
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 c