Re: [SQL] Question regarding indices

2010-09-14 Thread Frank Bax
Steve wrote: Original-Nachricht Datum: Sat, 11 Sep 2010 11:08:00 -0400 Von: Lew no...@lewscanon.com An: pgsql-sql@postgresql.org Betreff: Re: [SQL] Question regarding indices On 09/11/2010 08:29 AM, Steve wrote: I have a small question about the order of values in a query

Re: [SQL] Question regarding indices

2010-09-12 Thread Lew
On 09/11/2010 08:29 AM, Steve wrote: I have a small question about the order of values in a query. Assume I have a table with the following fields: uid INT, data BIGINT, hits INT And an unique index on (uid, data). I use libpq C API to query data from the table. The query is something

Re: [SQL] Question regarding indices

2010-09-12 Thread Steve
Original-Nachricht Datum: Sat, 11 Sep 2010 11:08:00 -0400 Von: Lew no...@lewscanon.com An: pgsql-sql@postgresql.org Betreff: Re: [SQL] Question regarding indices On 09/11/2010 08:29 AM, Steve wrote: I have a small question about the order of values in a query. Assume I

[SQL] Question regarding indices

2010-09-11 Thread Steve
Hello List, I have a small question about the order of values in a query. Assume I have a table with the following fields: uid INT, data BIGINT, hits INT And an unique index on (uid, data). I use libpq C API to query data from the table. The query is something like this: SELECT

Re: [SQL] Question regarding indices

2010-09-11 Thread Tom Lane
Steve stev...@gmx.net writes: I have a small question about the order of values in a query. Assume I have a table with the following fields: uid INT, data BIGINT, hits INT And an unique index on (uid, data). I use libpq C API to query data from the table. The query is something

Re: [SQL] Question regarding indices

2010-09-11 Thread Steve
Original-Nachricht Datum: Sat, 11 Sep 2010 10:05:18 -0400 Von: Michael Gould mgo...@intermodalsoftwaresolutions.net An: Steve stev...@gmx.net Betreff: Re: [SQL] Question regarding indices Steve, Hello Michael, If I remember correctly the sort only works

Re: [SQL] Question regarding indices

2010-09-11 Thread Steve
Original-Nachricht Datum: Sat, 11 Sep 2010 11:04:16 -0400 Von: Tom Lane t...@sss.pgh.pa.us An: Steve stev...@gmx.net CC: pgsql-sql@postgresql.org Betreff: Re: [SQL] Question regarding indices Steve stev...@gmx.net writes: I have a small question about the order

Re: [SQL] Question regarding indices

2010-09-11 Thread Tom Lane
Steve stev...@gmx.net writes: Von: Tom Lane t...@sss.pgh.pa.us It's unlikely to make enough difference to be worth the trouble. Making a quick sort is ultra easy in C. Anyway... is there a difference in the speed of the query with pre-sorted values or not? If there is one then I will go