On Fri, Oct 10, 2003 at 10:32:32AM -0700, Josh Berkus wrote:
> Dror,
>
> > Ouch. I just double checked and you're right. Is this considered a bug,
> > or just an implementation issue?
>
> It's an implementation issue, which may be fixed by 7.5 but not sooner.
> Basically, the free ability of Po
Dror,
> Ouch. I just double checked and you're right. Is this considered a bug,
> or just an implementation issue?
It's an implementation issue, which may be fixed by 7.5 but not sooner.
Basically, the free ability of PostgreSQL users to define their own
aggregates limits our ability to define
Greg Stark writes:
> Call it a wishlist bug. The problem is it would be a hard feature to
> implement properly. And none of the people paid to work on postgres
> by various companies seem to have this on their to-do lists. So
> don't expect it in the near future.
We are using Postgres heavily, and
On Thu, 9 Oct 2003, Dror Matalon wrote:
> On Thu, Oct 09, 2003 at 07:07:00PM -0400, Greg Stark wrote:
> > Dror Matalon <[EMAIL PROTECTED]> writes:
> >
> > > Actually what finally sovled the problem is repeating the
> > > dtstamp > last_viewed
> > > in the sub select
> >
> > That will at least c
Say, what do people think about a comment board thing like php.net has
attached to the documentation. People can add comments that show up directly
on the bottom of the documentation for each function. I find it's mostly full
of junk but skimming the comments often turns up one or two relevant war
Dror Matalon <[EMAIL PROTECTED]> writes:
> Ouch. I just double checked and you're right. Is this considered a bug,
> or just an implementation issue?
Call it a wishlist bug. The problem is it would be a hard feature to implement
properly. And none of the people paid to work on postgres by vario
On Thu, Oct 09, 2003 at 08:35:22PM -0500, Bruno Wolff III wrote:
> On Thu, Oct 09, 2003 at 17:44:46 -0700,
> Dror Matalon <[EMAIL PROTECTED]> wrote:
> >
> > How is doing order by limit 1 faster than doing max()? Seems like the
> > optimizer will need to sort or scan the data set either way. That
On Thu, Oct 09, 2003 at 17:44:46 -0700,
Dror Matalon <[EMAIL PROTECTED]> wrote:
>
> How is doing order by limit 1 faster than doing max()? Seems like the
> optimizer will need to sort or scan the data set either way. That part
> didn't actually make a difference in my specific case.
max() will
On Thu, Oct 09, 2003 at 07:07:00PM -0400, Greg Stark wrote:
> Dror Matalon <[EMAIL PROTECTED]> writes:
>
> > Actually what finally sovled the problem is repeating the
> > dtstamp > last_viewed
> > in the sub select
>
> That will at least convince the optimizer to use an index range lookup. But i
Dror Matalon <[EMAIL PROTECTED]> writes:
> Actually what finally sovled the problem is repeating the
> dtstamp > last_viewed
> in the sub select
That will at least convince the optimizer to use an index range lookup. But it
still will have to scan every record that matches channel==$1, link==$2,
Actually what finally sovled the problem is repeating the
dtstamp > last_viewed
in the sub select
select articlenumber, channel, description, title, link, dtstamp from items i1,
my_channels where ((i1.channel = '2' and
my_channels.id = '2' and owner = 'drormata' and (dtstamp > last_vi
Rod Taylor <[EMAIL PROTECTED]> writes:
> On Fri, 2003-10-03 at 17:53, Dror Matalon wrote:
> > On Fri, Oct 03, 2003 at 05:44:49PM -0400, Rod Taylor wrote:
> > >
> > > It is too bad the (channel, link) index doesn't have dtstamp at the end
> > > of it, otherwise the below query would be a gain (migh
> > I hope it isn't the first or second one ;)
>
> CREATE or REPLACE FUNCTION item_max_date (int4, varchar) RETURNS
> timestamptz AS '
> select max(dtstamp) from items where channel = $1 and link = $2;
> ' LANGUAGE 'sql';
How about the below?
CREATE or REPLACE FUNCTION item_max_date (int4, var
On Fri, Oct 03, 2003 at 06:10:29PM -0400, Rod Taylor wrote:
> On Fri, 2003-10-03 at 17:53, Dror Matalon wrote:
> > On Fri, Oct 03, 2003 at 05:44:49PM -0400, Rod Taylor wrote:
> > > > item_max_date() looks like this:
> > > >select max(dtstamp) from items where channel = $1 and link = $2;
> > >
On Fri, 2003-10-03 at 17:53, Dror Matalon wrote:
> On Fri, Oct 03, 2003 at 05:44:49PM -0400, Rod Taylor wrote:
> > > item_max_date() looks like this:
> > >select max(dtstamp) from items where channel = $1 and link = $2;
> >
> > It is too bad the (channel, link) index doesn't have dtstamp at th
On Fri, Oct 03, 2003 at 02:35:46PM -0700, Josh Berkus wrote:
> Dror,
>
> > I am using 7.4, and had tried NOT EXISTS and didn't see any
> > improvements.
>
> It wouldn't if you're using 7.4, which has improved IN performance immensely.
>
> What happens if you stop using a function and instead use
On Fri, Oct 03, 2003 at 05:44:49PM -0400, Rod Taylor wrote:
> > item_max_date() looks like this:
> >select max(dtstamp) from items where channel = $1 and link = $2;
>
> It is too bad the (channel, link) index doesn't have dtstamp at the end
> of it, otherwise the below query would be a gain (m
> item_max_date() looks like this:
>select max(dtstamp) from items where channel = $1 and link = $2;
It is too bad the (channel, link) index doesn't have dtstamp at the end
of it, otherwise the below query would be a gain (might be a small one
anyway).
select dtstamp
from items
where
Dror,
> I am using 7.4, and had tried NOT EXISTS and didn't see any
> improvements.
It wouldn't if you're using 7.4, which has improved IN performance immensely.
What happens if you stop using a function and instead use a subselect?
--
-Josh Berkus
Aglio Database Solutions
San Francisco
--
Hi Josh,
On Fri, Oct 03, 2003 at 02:07:10PM -0700, Josh Berkus wrote:
> Dror,
>
> > select articlenumber, channel, description, title, link, dtstamp from
> > items, my_channels where items.channel = '2' and my_channels.id =
> > '2' and owner = 'drormata' and dtstamp > last_view
Dror,
> select articlenumber, channel, description, title, link, dtstamp from
> items, my_channels where items.channel = '2' and my_channels.id =
> '2' and owner = 'drormata' and dtstamp > last_viewed and
> articlenumber not in (select item from viewed_items where chann
Hi,
I have a query that ran quite well initially, but slowed down quite a
bit once I introduced an aggregate into the equation. The average
execution time went up from around 15 msec to around 300 msec.
The original query fetches a bunch of articles:
select articlenumber, channel, description,
22 matches
Mail list logo