On 14/08/13 12:02, Robert James wrote:
I noticed that when I have an index on (a,b) of table t, and I do an
SELECT * FROM t ORDER BY a ASC, it doesn't use the index. When I
create a new index of only a, it does use the index. Why is that?
And, more importantly, when I do a query involving a me
On 8/13/13, Robert James wrote:
> I noticed that when I have an index on (a,b) of table t, and I do an
> SELECT * FROM t ORDER BY a ASC, it doesn't use the index. When I
> create a new index of only a, it does use the index. Why is that?
>
> And, more importantly, when I do a query involving a m
neral@postgresql.org
Subject: Re: [GENERAL] sort order
"Abraham, Danny" writes:
> This is exactly what I am trying to do -
> To find a CREATE DATABASE statement that will produce a database that has a
> binary sorting.
Setting its LC_COLLATE to "C" ought to do th
On Monday, December 12, 2011 7:55:37 am Abraham, Danny wrote:
> This is exactly what I am trying to do -
> To find a CREATE DATABASE statement that will produce a database that has a
> binary sorting.
http://www.postgresql.org/docs/9.0/interactive/sql-createdatabase.html
CREATE DATABASE name
[
"Abraham, Danny" writes:
> This is exactly what I am trying to do -
> To find a CREATE DATABASE statement that will produce a database that has a
> binary sorting.
Setting its LC_COLLATE to "C" ought to do that.
BTW, as of 9.1 you can control this at finer granularity than database
level, see t
@postgresql.org
Cc: Abraham, Danny
Subject: Re: [GENERAL] sort order
On Sunday, December 11, 2011 8:17:41 am Abraham, Danny wrote:
> On PG 9.0.4, Windows, Encoding and Collate WIN1252 trying to get a
> database to sort according to the ascii order. Example:
> Select t from test order by t
&g
On Sunday, December 11, 2011 8:17:41 am Abraham, Danny wrote:
> On PG 9.0.4, Windows, Encoding and Collate WIN1252 trying to get a
> database to sort according to the ascii order. Example:
> Select t from test order by t
> Should be exactly like
> Select t from test order by ascii(t).
>
> Can it
Hi,
On 26 August 2011 00:14, Tom Lane wrote:
> =?UTF-8?Q?Ondrej_Ivani=C4=8D?= writes:
>> work_mem is set to 4 000 000 kb and I do not understand why few
>> queries (3 and 5) used disk and the rest fit were able to data into
>> memory.
>
> The on-disk representation of sort data is quite a bit mo
=?UTF-8?Q?Ondrej_Ivani=C4=8D?= writes:
> work_mem is set to 4 000 000 kb and I do not understand why few
> queries (3 and 5) used disk and the rest fit were able to data into
> memory.
The on-disk representation of sort data is quite a bit more compact than
the in-memory representation. So where
> -Original Message-
> From: mark [mailto:dvlh...@gmail.com]
> Sent: Thursday, March 10, 2011 9:37 AM
> To: pgsql-general@postgresql.org
> Subject: sort mem: size in RAM vs size on Disk
>
> Hi all,
>
>
> I am wondering if anyone has any estimates on how much larger
> a working set for
On Thu, Mar 10, 2011 at 8:03 AM, Peter Geoghegan wrote:
> What version of PostgreSQL are you using? sort_mem is now called
> work_mem (to better reflect the reality that it isn't just used in
> sorting, I think), and has been for some time.
>
> --
> Peter Geoghegan http://www.2ndQuadrant.com
What version of PostgreSQL are you using? sort_mem is now called
work_mem (to better reflect the reality that it isn't just used in
sorting, I think), and has been for some time.
--
Peter Geoghegan http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training and Services
--
On Wed, 2009-02-04 at 02:15 -0800, wstrzalka wrote:
> Isn't it possible to sort only fields that order matters & some row
> identifier/position (don't really know what - oid/ctid are tight to
> table but something temporary tight to 'resultset')? It would take
> much less memory and could be proces
On Apr 4, 2006, at 3:22 PM, Matthew Peter wrote:
Tom Lane <[EMAIL PROTECTED]> wrote: Matthew Peter writes:
> What I'm trying to do is create a function that accepts a list
then sorts and groups the values (like in sql)... I will have an
unique list I can convert it to an array later or leave
Tom Lane <[EMAIL PROTECTED]> wrote: Matthew Peter writes:> What I'm trying to do is create a function that accepts a list then sorts and groups the values (like in sql)... I will have an unique list I can convert it to an array later or leave it a listThere is no "list" data structure in SQL.
Matthew Peter <[EMAIL PROTECTED]> writes:
> What I'm trying to do is create a function that accepts a list then sorts
> and groups the values (like in sql)... I will have an unique list I can
> convert it to an array later or leave it a list
There is no "list" data structure in SQL. There a
I'll help clarify exactly what I am trying to accomplish. What I'm trying to do is create a function that accepts a list then sorts and groups the values (like in sql)... I will have an unique list I can convert it to an array later or leave it a listI'd like to keep it simple and manipul
On Saturday 14 January 2006 14:06, Andrew - Supernews wrote:
> On 2006-01-14, Robert Paulsen <[EMAIL PROTECTED]> wrote:
> > Here is my query so far:
> >
> > SELECT foo, bar, baz, FROM my_table WHERE state ~ '[abc]'
> > ORDER BY state ASC LIMIT 1.
> >
> > This works as expected. My problem
On Saturday 14 January 2006 14:10, Michael Fuhr wrote:
> On Sat, Jan 14, 2006 at 01:38:52PM -0600, Robert Paulsen wrote:
> > SELECT foo, bar, baz, FROM my_table WHERE state ~ '[abc]'
> > ORDER BY state ASC LIMIT 1.
> >
> > This works as expected. My problem is that I am relying on the colla
On Sat, Jan 14, 2006 at 01:38:52PM -0600, Robert Paulsen wrote:
>
> SELECT foo, bar, baz, FROM my_table WHERE state ~ '[abc]'
> ORDER BY state ASC LIMIT 1.
>
> This works as expected. My problem is that I am relying on the collating
> sequence of the letters a-z and the desirability
On 2006-01-14, Robert Paulsen <[EMAIL PROTECTED]> wrote:
> Here is my query so far:
>
> SELECT foo, bar, baz, FROM my_table WHERE state ~ '[abc]'
> ORDER BY state ASC LIMIT 1.
>
> This works as expected. My problem is that I am relying on the collating
> sequence of the letters a-z and
On Fri, 2005-03-25 at 15:29 +0100, GIROIRE Nicolas (COFRAMI) wrote:
[re-arranged]
> [mailto:[EMAIL PROTECTED] la part de Ragnar
Hafstað
> > On Thu, 2005-03-24 at 15:49 +0100, GIROIRE Nicolas (COFRAMI) wrote:
>
> > > I create an array which is result of query on postgresql database
> and
> > >
Title: RE: [GENERAL] sort array optimisation in pl/perl
Hi,
thanks for this help.
The method functions great but the profit of time is good just if I have a lot of elements to deplace.
COFRAMI
Nicolas Giroire
on behalf of AIRBUS France
for In Flight
On Thu, 2005-03-24 at 15:49 +0100, GIROIRE Nicolas (COFRAMI) wrote:
> I create an array which is result of query on postgresql database and
> then I want to sort rows in a particular way (impossible by query on
> database).
can you give us more details on this particular sort order?
> My solutio
In article <[EMAIL PROTECTED]>,
Jim C. Nasby <[EMAIL PROTECTED]> wrote:
>Of course I wasn't planning on sucking down a bunch of memory and
>holding on to it. :)
What are you worried about? The unused portions will eventually be paged
out to disk. On the next sort, you'll spend a little less time
"Andrey Y. Mosienko" <[EMAIL PROTECTED]> writes:
>> If DD/MM/ is not close enough for you, maybe the right answer is to
>> add another DateStyle.
> Sorry for disturbing, but how can I do this or where is it in documentation?
It's not documented; you'd have to dig into the code and see how th
Tom Lane wrote:
>
> > On Tue, 21 Aug 2001, Andrey Y. Mosienko wrote:
> > But in Russia we have the next date format: DD-MM-.
>
> Just setting DateStyle to 'SQL' would get you approximately what you
> want:
>
> regression=# set DateStyle TO SQL;
> SET VARIABLE
> regression=# select now();
>
omid omoomi wrote:
>
> and how about this:
>
> SELECT TO_CHAR(chdate, 'DD-MM-')
> FROM mytable
> ORDER BY chdate::date;
Yes, but Andrey says that the chdate field is declared as a date:
> > > > On Tue, 21 Aug 2001, Andrey Y. Mosienko wrote:
> > > >
> > > > >
> > > > > I have table with dat
and how about this:
SELECT TO_CHAR(chdate, 'DD-MM-')
FROM mytable
ORDER BY chdate::date;
>From: Mike Mascari <[EMAIL PROTECTED]>
>To: "Andrey Y. Mosienko" <[EMAIL PROTECTED]>
>CC: Stephan Szabo <[EMAIL PROTECTED]>, Postgres
><[EMAI
"Andrey Y. Mosienko" wrote:
>
> Stephan Szabo wrote:
> >
> > On Tue, 21 Aug 2001, Andrey Y. Mosienko wrote:
> >
> > >
> > > I have table with date type column:
> > >
> > > chdate date;
> > >
> > > SELECT chdate from mytable;
> > >
> > >chdate
> > > 1999-01-02
> > >
> > > But in Russia we hav
- Original Message -
From: "Nathan Barnett" <[EMAIL PROTECTED]>
To: "'Mitch Vincent'" <[EMAIL PROTECTED]>
Sent: Friday, July 21, 2000 3:03 PM
Subject: RE: [GENERAL] Sort
> Here is the query:
>
> SELECT Impression.AdNu
31 matches
Mail list logo