That solved it.
Thanks!
Michael
- Original Message
From: Tom Lane
To: Michael Fork
Cc: pgsql-general@postgresql.org
Sent: Tue, December 29, 2009 11:19:42 PM
Subject: Re: [GENERAL] Planner Row Estimate with Function
Michael Fork writes:
>> Also, what happened to the type=&
0'::text = ANY
(parsecardidfromreferencecode(reference_code)))
-> Bitmap Index Scan on idx_event_card_id (cost=0.00..1668821.37
rows=44565021 width=0)
Thanks.
Michael
- Original Message
From: Pavel Stehule
To: Michael Fork
Cc: pgsql-general@postgresql.org
Sent: Tue, December 2
, this is partial index. I should have included the index definition
earlier:
# CREATE INDEX CONCURRENTLY idx_event_card_id ON
trail.event(parsecardidfromreferencecode(reference_code)) WHERE type =
'CREDIT'; Thanks.
Michael
- Original Message
From: Tom Lane
To: Michae
=0.00..401311.59 rows=223890
width=103)
Index Cond: ("substring"(reference_code, 3, 13) = '057729970'::text)
(2 rows)
Thanks.
Michael
- Original Message
From: Pavel Stehule
To: Michael Fork
Cc: pgsql-general@postgresql.org
Sent: Tue, December 29, 2009 12:
I have an index scan on a custom function that is returning a wildly incorrect
row estimate that is throwing off the rest of the query planning. The result
of the function is roughly unique - there are a handful with multiple entries -
but the planner is estimating 227,745 rows. I re-ran ANALY
How about:
select to_char(mtrantime,'mm-dd hh AM') as datetime,
to_char(mtrantime,'AM') as sort_field,
count(*) as tot from memtran
group by sort_field, datetime
order by sort_field, datetime;
Then ignore the sort_field column?
Michael
"Mike Nolan" <[EMAIL PROTECTED]> wrote
You can use a where clause when selecting from a veiew, so the following
should work for you:
CREATE VIEW my_view AS SELECT o.*, n.descr, n.lang
FROM nation n, org o
WHERE o.nation = n.code
SELECT * FROM my_view WHERE n.lang = someKnownQuantity
Michael Fork - CCNA - MCP
Can someone tell me what I am missing here...
Thanks
Michael Fork - CCNA - MCP - A+
Network Support - Toledo Internet Access - Toledo Ohio
radius=# BEGIN;
BEGIN
radius=# select age(tstamp, now()) from radacct limit 1;
age
--
03:37:08 ago
(1 row)
radius=# select age(now
, you recieve the last value used by *your backend*
(regardless of what others have done).
Michael Fork - CCNA - MCP - A+
Network Support - Toledo Internet Access - Toledo Ohio
On Fri, 2 Mar 2001, Gregory Wood wrote:
> SELECT currval('Table_SerialField_SEQ');
>
> Note: This selec
vals WHERE y > 0;
SELECT a.x/b.y FROM vals a, valid_vals b WHERE (a.x
/ b.y) > 1
Michael Fork - CCNA - MCP - A+
Network Support - Toledo Internet Access - Toledo Ohio
On Wed, 14 Feb 2001, Patrick Welche wrote:
> create table vals (
> x float,
> y float
> );
> insert
Indexes *can* and *will* be used if you create the appropiate
functional indexes, i.e:
CREATE INDEX idx_table_field_upper ON table(upper(field));
SELECT field FROM table WHERE upper(field) LIKE upper('some string');
Michael Fork - CCNA - MCP - A+
Network Support - Toledo Inter
You can create a case insensitive, unique index like this:
CREATE UNIQUE INDEX indexname ON tablename (lower(fieldname))
Michael Fork - CCNA - MCP - A+
Network Support - Toledo Internet Access - Toledo Ohio
On Tue, 30 Jan 2001, Culley Harrelson wrote:
> is there a way to make a unique in
Michael Fork - CCNA - MCP - A+
Network Support - Toledo Internet Access - Toledo Ohio
On Tue, 30 Jan 2001, Nelio Alves Pereira Filho wrote:
> Yes, but how can I pass a reference of the row just inserted to the
> trigger??
>
> adb wrote:
> >
> > Sounds like you need to use a
Try these queries...
SELECT injdate, outcome, count(outcome) FROM safety GROUP BY
injdate,outcome;
or
SELECT outcome, count(outcome) FROM safety WHERE injdate='2000-11-14'
GROUP BY outcome;
Michael Fork - CCNA - MCP - A+
Network Support - Toledo Internet Access - Toledo Ohio
On T
acct on tiacct (cost=0.00..253.88 rows=96 width=44
^^
In this situation Postgres will use the seq scan, rather than the index
scan, due to its cheaper cost.
Michael Fork - CCNA - MCP - A+
Network Support - Toledo Internet Access - Toledo Ohio
15 matches
Mail list logo