Re: [GENERAL] select unique items in db

2006-09-16 Thread a
it returns nill now or nuthing and it is very very very slow Stijn Vanroye wrote: > a schreef: > > this doesnt work > > > > SELECT DISTINCT on link *, rank(ts_vec, to_tsquery('default', $qtxt)) > > FROM feed_entry WHERE ts_vec @@ to_tsquery('default', $qtxt) ORDER > > BY rank(ts_vec, to_tsquery

Re: [GENERAL] select unique items in db

2006-09-15 Thread Stijn Vanroye
a schreef: it returns nill now or nuthing and it is very very very slow This is not much info. What is the actual query you are using now? What are the tables like you are running your query against? I'cant really get a good understanding of your problem. So far I have just given you a gener

Re: [GENERAL] select unique items in db

2006-09-14 Thread Stijn Vanroye
a schreef: this doesnt work SELECT DISTINCT on link *, rank(ts_vec, to_tsquery('default', $qtxt)) FROM feed_entry WHERE ts_vec @@ to_tsquery('default', $qtxt) ORDER BY rank(ts_vec, to_tsquery('default', $qtxt)) DESC LIMIT 5 OFFSET 0 can you tell me how to get the DISTINCT elements in LINK t

Re: [GENERAL] select unique items in db

2006-09-13 Thread a
this doesnt work SELECT DISTINCT on link *, rank(ts_vec, to_tsquery('default', $qtxt)) FROM feed_entry WHERE ts_vec @@ to_tsquery('default', $qtxt) ORDER BY rank(ts_vec, to_tsquery('default', $qtxt)) DESC LIMIT 5 OFFSET 0 can you tell me how to get the DISTINCT elements in LINK thanks Stijn

Re: [GENERAL] select unique items in db

2006-09-13 Thread Stijn Vanroye
a schreef: "select unique id" - i found this line in google search but i want to make select * as unique select unique * is or select distinct pls point out how to select unique items from a list of million items Maybe select distinct from ... or select distinct on (field1,field2) from ...