Re: [GENERAL] Problem with result ordering

2007-01-26 Thread Filip Rembiałkowski
2007/1/25, Thorsten Körner <[EMAIL PROTECTED]>: Hi, when I fire the following query: select m_id, m_u_id, m_title, m_rating from tablename where m_id in (26250, 11042, 16279, 42197, 672089); I will get the same results in the same order, as in in the next query: select m_id, m_u_id, m_title, m_

Re: [GENERAL] Problem with result ordering

2007-01-26 Thread Ted Byers
Hi Ted, Hi Thorsten, Am Donnerstag, 25. Januar 2007 19:53 schrieb Ted Byers: The question I'd ask before offering a solution is, "Does the order of the id data matter, or is it a question of having all the results for a given id together before proceeding to the next id?" The answer to th

Re: [GENERAL] Problem with result ordering

2007-01-26 Thread Thorsten Körner
Hi Ted, Am Donnerstag, 25. Januar 2007 19:53 schrieb Ted Byers: > The question I'd ask before offering a solution is, "Does the order of the > id data matter, or is it a question of having all the results for a given > id together before proceeding to the next id?" The answer to this will > deter

Re: [GENERAL] Problem with result ordering

2007-01-25 Thread Tommy Gildseth
Tom Lane wrote: Thorsten =?iso-8859-1?q?K=F6rner?= <[EMAIL PROTECTED]> writes: select m_id, m_u_id, m_title, m_rating from tablename where m_id in (26250, 11042, 16279, 42197, 672089); You could rewrite the query as select ... from tablename where m_id = 26250 union all select ... from

Re: [GENERAL] Problem with result ordering

2007-01-25 Thread Ted Byers
never just assume that it is best to do all the processing in the RDBMS backend to my apps. HTH Ted - Original Message - From: "Thorsten Körner" <[EMAIL PROTECTED]> To: Sent: Thursday, January 25, 2007 10:45 AM Subject: [GENERAL] Problem with result ordering Hi,

Re: [GENERAL] Problem with result ordering

2007-01-25 Thread Thorsten Körner
Hi Fillip, thanks for your hint, I have tested it on a development database, and it worked well. Are there any experiences how this will affect performance on a large database, with very high traffic? Is it recommended to use temp tables in such an environment? THX in advance Thorsten Am Donn

Re: [GENERAL] Problem with result ordering

2007-01-25 Thread A. Kretschmer
am Thu, dem 25.01.2007, um 16:45:23 +0100 mailte Thorsten Körner folgendes: > Hi, > > when I fire the following query: > select m_id, m_u_id, m_title, m_rating from tablename where m_id in (26250, > 11042, 16279, 42197, 672089); > > I will get the same results in the same order, as in in the ne

Re: [GENERAL] Problem with result ordering

2007-01-25 Thread Tom Lane
Thorsten =?iso-8859-1?q?K=F6rner?= <[EMAIL PROTECTED]> writes: > select m_id, m_u_id, m_title, m_rating from tablename where m_id in (26250, > 11042, 16279, 42197, 672089); > I wonder, how it is possible, to retrieve the results in the same order, as > queried in the list. You could rewrite the

Re: [GENERAL] Problem with result ordering

2007-01-25 Thread Ron Johnson
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 01/25/07 09:45, Thorsten Körner wrote: > Hi, > > when I fire the following query: > select m_id, m_u_id, m_title, m_rating from tablename where m_id in (26250, > 11042, 16279, 42197, 672089); > > I will get the same results in the same order, as

[GENERAL] Problem with result ordering

2007-01-25 Thread Thorsten Körner
Hi, when I fire the following query: select m_id, m_u_id, m_title, m_rating from tablename where m_id in (26250, 11042, 16279, 42197, 672089); I will get the same results in the same order, as in in the next query: select m_id, m_u_id, m_title, m_rating from tablename where m_id in (11042,42197