pg.ddx.io pgsql-sql@postgresql.org mailing list archive
help / color / mirror / Atom feed(long) What's the problem?
4+ messages / 3 participants
[nested] [flat]
* (long) What's the problem?
@ 2003-06-06 00:45 David Olbersen <DOlbersen@stbernard.com>
0 siblings, 1 reply; 4+ messages in thread
From: David Olbersen @ 2003-06-06 00:45 UTC (permalink / raw)
To: pgsql-sql
Anybody have any ideas about a problem with this query?
urldb2=> EXPLAIN
urldb2-> SELECT
urldb2-> id,
urldb2-> source,
urldb2-> insertedby,
urldb2-> insertedon,
urldb2-> priority
urldb2-> FROM
urldb2-> indexscan
urldb2-> WHERE
urldb2-> lower(
urldb2-> substring(
urldb2-> urlhost( source ), rposition( 'www.', urlhost( source ) ) + 2
urldb2-> )
urldb2-> ) ~ '^q.*'
urldb2-> ORDER BY source;
QUERY PLAN
-------------------------------------------------------------------------------------------------------------------------------------------
Sort (cost=23.50..23.50 rows=3 width=48)
Sort Key: source
-> Seq Scan on indexscan (cost=0.00..23.47 rows=3 width=48)
Filter: (lower("substring"(urlhost(source), (rposition('www.'::text, (urlhost(source))::character varying) + 2))) ~ '^q.*'::text)
(4 rows)
OK, cost=23.50..23.50, should be a quickie. I'll EXPLAIN ANALYZE just to be safe:
urldb2=> EXPLAIN ANALYZE
urldb2-> SELECT
urldb2-> id,
urldb2-> source,
urldb2-> insertedby,
urldb2-> insertedon,
urldb2-> priority
urldb2-> FROM
urldb2-> indexscan
urldb2-> WHERE
urldb2-> lower(
urldb2-> substring(
urldb2-> urlhost( source ), rposition( 'www.', urlhost( source ) ) + 2
urldb2-> )
urldb2-> ) ~ '^q.*'
urldb2-> ORDER BY source;
server closed the connection unexpectedly
This probably means the server terminated abnormally
before or while processing the request.
The connection to the server was lost. Attempting reset: Failed.
Since EXPLAIN ANALYZE runs the query and then analyzes the results I haven't included that in this email because the error is the same.
urlhost() is an immutable custom Pl/Perl function.
rposition() is a volatile custom C function.
indexscan has 614 tuples and only takes up 7 pages.
The load on this machine is zero when I attempt this, and no other processes are trying to use massive amounts of resources. This is a P3 550 with 512MB of RAM.
I can provide more information if needed.
Anybody have ideas about the problem?
--------------------------
David Olbersen
iGuard Engineer
11415 West Bernardo Court
San Diego, CA 92127
1-858-676-2277 x2152
^ permalink raw reply [nested|flat] 4+ messages in thread
* (long) What's the problem?
@ 2003-06-06 16:23 David Olbersen <DOlbersen@stbernard.com>
0 siblings, 1 reply; 4+ messages in thread
From: David Olbersen @ 2003-06-06 16:23 UTC (permalink / raw)
To: pgsql-sql
Anybody have any ideas about a problem with this query?
urldb2=> EXPLAIN
urldb2-> SELECT
urldb2-> id,
urldb2-> source,
urldb2-> insertedby,
urldb2-> insertedon,
urldb2-> priority
urldb2-> FROM
urldb2-> indexscan
urldb2-> WHERE
urldb2-> lower(
urldb2-> substring(
urldb2-> urlhost( source ), rposition( 'www.', urlhost( source ) ) + 2
urldb2-> )
urldb2-> ) ~ '^q.*'
urldb2-> ORDER BY source;
QUERY PLAN
-------------------------------------------------------------------------------------------------------------------------------------------
Sort (cost=23.50..23.50 rows=3 width=48)
Sort Key: source
-> Seq Scan on indexscan (cost=0.00..23.47 rows=3 width=48)
Filter: (lower("substring"(urlhost(source), (rposition('www.'::text, (urlhost(source))::character varying) + 2))) ~ '^q.*'::text)
(4 rows)
OK, cost=23.50..23.50, should be a quickie. I'll EXPLAIN ANALYZE just to be safe:
urldb2=> EXPLAIN ANALYZE
urldb2-> SELECT
urldb2-> id,
urldb2-> source,
urldb2-> insertedby,
urldb2-> insertedon,
urldb2-> priority
urldb2-> FROM
urldb2-> indexscan
urldb2-> WHERE
urldb2-> lower(
urldb2-> substring(
urldb2-> urlhost( source ), rposition( 'www.', urlhost( source ) ) + 2
urldb2-> )
urldb2-> ) ~ '^q.*'
urldb2-> ORDER BY source;
server closed the connection unexpectedly
This probably means the server terminated abnormally
before or while processing the request.
The connection to the server was lost. Attempting reset: Failed.
Since EXPLAIN ANALYZE runs the query and then analyzes the results I haven't included that in this email because the error is the same.
urlhost() is an immutable custom Pl/Perl function.
rposition() is a volatile custom C function.
indexscan has 614 tuples and only takes up 7 pages.
The load on this machine is zero when I attempt this, and no other processes are trying to use massive amounts of resources. This is a P3 550 with 512MB of RAM.
I can provide more information if needed.
Anybody have ideas about the problem?
--------------------------
David Olbersen
iGuard Engineer
11415 West Bernardo Court
San Diego, CA 92127
1-858-676-2277 x2152
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: (long) What's the problem?
@ 2003-06-07 23:57 Rod Taylor <rbt@rbt.ca>
parent: David Olbersen <DOlbersen@stbernard.com>
0 siblings, 0 replies; 4+ messages in thread
From: Rod Taylor @ 2003-06-07 23:57 UTC (permalink / raw)
To: David Olbersen <DOlbersen@stbernard.com>; +Cc: pgsql-sql
> rposition() is a volatile custom C function.
Does the query function as expected when not being EXPLAINed ?
Odds are it's a bug in the custom C function.
--
Rod Taylor <rbt@rbt.ca>
PGP Key: http://www.rbt.ca/rbtpub.asc
Attachments:
signature.asc (application/pgp-signature, 186B) download
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: (long) What's the problem?
@ 2003-06-08 15:08 Jan Wieck <JanWieck@Yahoo.com>
parent: David Olbersen <DOlbersen@stbernard.com>
0 siblings, 0 replies; 4+ messages in thread
From: Jan Wieck @ 2003-06-08 15:08 UTC (permalink / raw)
To: David Olbersen <DOlbersen@stbernard.com>; +Cc: pgsql-sql
David Olbersen wrote:
> Anybody have any ideas about a problem with this query?
>
> urldb2=> EXPLAIN
> urldb2-> SELECT
> urldb2-> id,
> urldb2-> source,
> urldb2-> insertedby,
> urldb2-> insertedon,
> urldb2-> priority
> urldb2-> FROM
> urldb2-> indexscan
> urldb2-> WHERE
> urldb2-> lower(
> urldb2-> substring(
> urldb2-> urlhost( source ), rposition( 'www.', urlhost( source ) ) + 2
> urldb2-> )
> urldb2-> ) ~ '^q.*'
> urldb2-> ORDER BY source;
>
> QUERY PLAN
> -------------------------------------------------------------------------------------------------------------------------------------------
> Sort (cost=23.50..23.50 rows=3 width=48)
> Sort Key: source
> -> Seq Scan on indexscan (cost=0.00..23.47 rows=3 width=48)
> Filter: (lower("substring"(urlhost(source), (rposition('www.'::text, (urlhost(source))::character varying) + 2))) ~ '^q.*'::text)
> (4 rows)
>
> OK, cost=23.50..23.50, should be a quickie. I'll EXPLAIN ANALYZE just to be safe:
>
> urldb2=> EXPLAIN ANALYZE
> urldb2-> SELECT
> urldb2-> id,
> urldb2-> source,
> urldb2-> insertedby,
> urldb2-> insertedon,
> urldb2-> priority
> urldb2-> FROM
> urldb2-> indexscan
> urldb2-> WHERE
> urldb2-> lower(
> urldb2-> substring(
> urldb2-> urlhost( source ), rposition( 'www.', urlhost( source ) ) + 2
> urldb2-> )
> urldb2-> ) ~ '^q.*'
> urldb2-> ORDER BY source;
>
> server closed the connection unexpectedly
> This probably means the server terminated abnormally
> before or while processing the request.
> The connection to the server was lost. Attempting reset: Failed.
If I would be you I would unlimit the coresize in the environment the
postmaster is running, eventually recompile with debug symbols enabled
and look at the stack backtrace of the coredump created when then
backend crashes.
Jan
--
#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me. #
#================================================== JanWieck@Yahoo.com #
^ permalink raw reply [nested|flat] 4+ messages in thread
end of thread, other threads:[~2003-06-08 15:08 UTC | newest]
Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2003-06-06 00:45 (long) What's the problem? David Olbersen <DOlbersen@stbernard.com>
2003-06-08 15:08 ` Jan Wieck <JanWieck@Yahoo.com>
2003-06-06 16:23 (long) What's the problem? David Olbersen <DOlbersen@stbernard.com>
2003-06-07 23:57 ` Rod Taylor <rbt@rbt.ca>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox