On Mon, Oct 12, 2009 at 1:06 PM, Tory M Blue wrote:
> Any issues, has it baked long enough, is it time for us 8.3 folks to deal
> with the pain and upgrade?
I am running 8.4.1 for my stats and search databases, and it's working fine.
> Anymore updates regarding 8.4 and slon 1.2 as well, since I
Hi,
CREATE INDEX mail_id_sent_idx ON mail(id,sent)
should do the trick? Of course you can only replace one of the two
scans by an index scan since there are no other conditions...
Jacques.
At 09:59 13/10/2009, Michael Schwipps wrote:
Hi,
I want to select the last contact of person via mail
On Tue, Oct 13, 2009 at 9:59 AM, Michael Schwipps wrote:
> Hi,
>
> I want to select the last contact of person via mail.
> My sample database is build with the following shell-commands
>
> | createdb -U postgres test2
> | psql -U postgres test2 < mail_db.sql
> | mailtest.sh | psql -U postgres
>
>
Hi,
I want to select the last contact of person via mail.
My sample database is build with the following shell-commands
| createdb -U postgres test2
| psql -U postgres test2 < mail_db.sql
| mailtest.sh | psql -U postgres
I call to get the answer
| SELECT address, max(sent) from mail inner join
On Tue, Oct 13, 2009 at 01:03:10AM -0600, Scott Marlowe wrote:
> On Mon, Oct 12, 2009 at 1:06 PM, Tory M Blue wrote:
> > Any issues, has it baked long enough, is it time for us 8.3 folks to deal
> > with the pain and upgrade?
>
> I am running 8.4.1 for my stats and search databases, and it's work
Hi,
I am running performance simulation against a DB. I want to randomly pull
different records from a large table. However the table has no columns that
hold sequential integer values (1..MAX), i.e. the columns all have "holes"
(due to earlier filtering). Also PG does not have a concept of an
aut
On Tue, Oct 13, 2009 at 4:17 PM, Shaul Dar wrote:
> Hi,
>
> I am running performance simulation against a DB. I want to randomly pull
> different records from a large table. However the table has no columns that
> hold sequential integer values (1..MAX), i.e. the columns all have "holes"
> (due t
Shaul Dar, 13.10.2009 17:17:
Also PG does not have a concept of an auto-increment pseudo-column
like Oracle's "rownum". Any suggestions?
Yes it does (at least 8.4)
SELECT row_number() over(), the_other_columns...
FROM your_table
So you could do something like:
SELECT *
FROM (
SELECT row_nu
Sorry, I guess I wasn't clear.
I have an existing table in my DB, and it doesn't have a column with serial
values (actually it did originally, but due to later deletions of about 2/3
of the rows the column now has "holes"). I realize I could add a new serial
column, but prefer not to change table +
On Oct 13, 2009, at 11:19 , Grzegorz Jaśkiewicz wrote:
On Tue, Oct 13, 2009 at 4:17 PM, Shaul Dar wrote:
Also PG does not have a concept of an auto-increment pseudo-column
like
Oracle's "rownum". Any suggestions?
not true - it has sequences, and pseudo type serial. Rtfm!.
AIUI, rownum
2009/10/13 Shaul Dar
> Sorry, I guess I wasn't clear.
> I have an existing table in my DB, and it doesn't have a column with serial
> values (actually it did originally, but due to later deletions of about 2/3
> of the rows the column now has "holes"). I realize I could add a new serial
> column,
Michael,
You are right. I didn't remember the semantics, and Oracle's rownum would
not have been helpful. But the new row_number() in 8.4 would probably do the
trick (though I use 8.3.7 :-( )
-- Shaul
2009/10/13 Michael Glaesemann
>
> On Oct 13, 2009, at 11:19 , Grzegorz Jaśkiewicz wrote:
>
>
2009/10/13 Grzegorz Jaśkiewicz :
>
>
> 2009/10/13 Shaul Dar
>>
>> Sorry, I guess I wasn't clear.
>> I have an existing table in my DB, and it doesn't have a column with
>> serial values (actually it did originally, but due to later deletions of
>> about 2/3 of the rows the column now has "holes").
2009/10/13 Grzegorz Jaśkiewicz :
>
>
> 2009/10/13 Shaul Dar
>>
>> Sorry, I guess I wasn't clear.
>> I have an existing table in my DB, and it doesn't have a column with
>> serial values (actually it did originally, but due to later deletions of
>> about 2/3 of the rows the column now has "holes").
On Tue, Oct 13, 2009 at 9:17 AM, Shaul Dar wrote:
> Hi,
>
> I am running performance simulation against a DB. I want to randomly pull
> different records from a large table. However the table has no columns that
> hold sequential integer values (1..MAX), i.e. the columns all have "holes"
> (due to
2009/10/14 Scott Marlowe :
>
> If what you're trying to do is emulate a real world app which randomly
> grabs rows, then you want to setup something ahead of time that has a
> pseudo random order and not rely on using anything like order by
> random() limit 1 or anything like that. Easiest way is
16 matches
Mail list logo