Re: [PERFORM] Query about index usage

2010-06-13 Thread Jayadevan M
> PostgreSQL can't currently avoid reading the table, because that's > where the tuple visibility information is stored. We've been making > progress toward having some way to avoid reading the table for all > except very recently written tuples, but we're not there yet (in any > production versio

Re: [PERFORM] out of memory

2010-06-13 Thread Kenichiro Tanaka
Hello I think this SQL returns the following error. ERROR: missing FROM-clause entry for table "email_track" LINE 3: email_track.count AS "Emails_Access_Count", ^ For a fact ,this SQL does not have the "email_trac" table in from-clause. 1)Is this SQL right? 2)If the SQL is right, ca

Re: [PERFORM] Analysis Function

2010-06-13 Thread David Jarvis
Hi, It's not immediately obvious what the default value of "timezone" > will be? > The system's locale, like now(); documentation can clarify. By named parameter, I meant default value. You could construct a timestamp variable using: construct_timestamp( year := 1900, hour := 1 ) When I read

Re: [PERFORM] Analysis Function

2010-06-13 Thread Tom Lane
Magnus Hagander writes: > On Sun, Jun 13, 2010 at 17:42, Tom Lane wrote: >> ... (We presumably want >> timezone to default to the system timezone setting, but I wonder how >> we should make that work --- should an empty string be treated as >> meaning that?) > Umm. NULL could be made to mean tha

Re: [PERFORM] Analysis Function

2010-06-13 Thread Magnus Hagander
On Sun, Jun 13, 2010 at 17:42, Tom Lane wrote: > Magnus Hagander writes: >> On Sun, Jun 13, 2010 at 09:38, David Jarvis wrote: >>> Does it makes sense to use named parameter notation for the first value (the >>> year)? This could be potentially confusing: > >> How so? If it does named parameters

Re: [PERFORM] Analysis Function

2010-06-13 Thread Tom Lane
Magnus Hagander writes: > On Sun, Jun 13, 2010 at 09:38, David Jarvis wrote: >> Does it makes sense to use named parameter notation for the first value (the >> year)? This could be potentially confusing: > How so? If it does named parameters, why not all? There's no reason not to allow the year

Re: [PERFORM] Analysis Function

2010-06-13 Thread Tom Lane
Heikki Linnakangas writes: > We could have a function like: > construct_timestamp(year int4, month int4, date int4, hour int4, minute > int4, second int4, milliseconds int4, timezone text) This fails to allow specification to the microsecond level (and note that with float timestamps even small

Re: [PERFORM] out of memory

2010-06-13 Thread Anj Adu
Can you provide these details work_mem How much physical memory there is on your system Most out of memory errors are associated with a high work_mem setting On Sun, Jun 13, 2010 at 6:25 AM, AI Rumman wrote: > Whenever I run this query, I get out of memory error: > > > explain analyze > select

[PERFORM] out of memory

2010-06-13 Thread AI Rumman
Whenever I run this query, I get out of memory error: explain analyze *select * email_track.count AS "Emails_Access_Count", activity.subject AS "Emails_Subject", crmentity.crmid AS EntityId_crmentitycrmid *from * (select * from crmentity where deleted = 0 and createdtime between (now() - interval

Re: [PERFORM] query hangs

2010-06-13 Thread AI Rumman
Any more idea, please. Is table partition a good solution for query optimization? On Fri, Jun 11, 2010 at 11:09 AM, Amit Khandekar < amit.khande...@enterprisedb.com> wrote: > > > On 10 June 2010 18:47, AI Rumman wrote: > >> I am using Postgresql 8.1 and did not find FETCH_COUNT >> >> > Oh ok. Lo

Re: [PERFORM] Analysis Function

2010-06-13 Thread Magnus Hagander
On Sun, Jun 13, 2010 at 09:38, David Jarvis wrote: > Hi, > >> We had a little chat about this with Magnus. It's pretty surprising that >> there's no built-in function to do this, we should consider adding one. > > I agree; you should be able to create a timestamp or a date from integer > values. O

Re: [PERFORM] Analysis Function

2010-06-13 Thread David Jarvis
Hi, We had a little chat about this with Magnus. It's pretty surprising that > there's no built-in function to do this, we should consider adding one. > I agree; you should be able to create a timestamp or a date from integer values. Others, apparently, have written code. The implementation I did