pg.ddx.io pgsql-bugs@postgresql.org mailing list archive
help / color / mirror / Atom feedBUG #8117: simple but huge query infinite execution time
2+ messages / 2 participants
[nested] [flat]
* BUG #8117: simple but huge query infinite execution time
@ 2013-04-25 14:38 haddock@mail.ru
2013-04-25 15:12 ` Re: BUG #8117: simple but huge query infinite execution time Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 1 reply; 2+ messages in thread
From: haddock@mail.ru @ 2013-04-25 14:38 UTC (permalink / raw)
To: pgsql-bugs
The following bug has been logged on the website:
Bug reference: 8117
Logged by: Viacheslav Seledkin
Email address: haddock@mail.ru
PostgreSQL version: 9.2.3
Operating system: Linux, Windows
Description:
you can get query here
http://yadi.sk/d/uE-KE0b34LV5A
query has the following scheme
SELECT
regexp_matches('...',' (\d+)\:','g'),
regexp_matches('...','\:([\d\.]+)','g')
where '...' is approximately 40kb string (the same in both ...)
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: BUG #8117: simple but huge query infinite execution time
2013-04-25 14:38 BUG #8117: simple but huge query infinite execution time haddock@mail.ru
@ 2013-04-25 15:12 ` Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 0 replies; 2+ messages in thread
From: Tom Lane @ 2013-04-25 15:12 UTC (permalink / raw)
To: haddock@mail.ru; +Cc: pgsql-bugs
haddock@mail.ru writes:
> query has the following scheme
> SELECT
> regexp_matches('...',' (\d+)\:','g'),
> regexp_matches('...','\:([\d\.]+)','g')
I'm not sure what you're expecting this to do, but what it will actually
do is produce a number of rows equal to the least common multiple of the
periods of the two set-returning functions. In this example it seems
the first call produces 2510 rows and the second 2507 rows. Those
numbers have no factors in common, so you get 6292570 rows, the same as
if you'd written "select * from regexp_matches(...), regexp_matches(...)".
In short, I see no bug here. The behavior of queries with multiple SRFs
in the same targetlist is a bit dubious, but we're not going to change
it, except perhaps by deprecating such usages altogether.
regards, tom lane
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2013-04-25 15:12 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2013-04-25 14:38 BUG #8117: simple but huge query infinite execution time haddock@mail.ru
2013-04-25 15:12 ` Tom Lane <tgl@sss.pgh.pa.us>
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