[SQL]

2007-02-13 Thread Franz Stützle
unsubscribe
-- 
Der GMX SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen! 
Ideal für Modem und ISDN: http://www.gmx.net/de/go/smartsurfer

---(end of broadcast)---
TIP 4: Have you searched our list archives?

   http://archives.postgresql.org


Re: [SQL] Most efficient way to hard-sort records

2007-02-13 Thread Michael Glaesemann


On May 6, 2006, at 17:13 , Miroslav Šulc wrote:

I have a table with cca 100,000 records. I need to hard-sort the  
records

by a key from second table. By hard-sorting I mean storing position of
each row in the main table. Here is what my tables look like:

main_table: id, name, position
key_table: id, main_table_id, key, value

Here is how I need to sort the records:
SELECT * FROM main_table
INNER JOIN key_table ON main_table.id = key_table.main_table_id
WHERE key = 'param'
ORDER BY value


I don't know about faster or more efficient, but here's an  
alternative that I haven't seen yet:





Michael Glaesemann
grzm seespotcode net




---(end of broadcast)---
TIP 6: explain analyze is your friend


[SQL] Regaring posting a query

2007-02-13 Thread sahaanaa subha
Dear sir,
 I would like to know how to post my queres in postgres mailing list and how to view the answers.
Thanks & Regards
subha.N I use Kify Mail - http://email.kify.com - Get your Kify Mail Account Today - Its Free, Fast, Easy, Secure & Spam-Free.