Rules slower than Dynamic SQL ?

Started by Alex Vinogradovsover 18 years ago3 messagesgeneral
Jump to latest
#1Alex Vinogradovs
AVinogradovs@Clearpathnet.com

Hi all,

I've got a data warehouse with pretty high rate of insert into
partitioned tables. What I've noticed, is that rule-based partitioning
seems to be somewhat slower than insertions made directly into
partitions through execution of dynamic SQL.

Is it really true ?

Thanks!

Best regards,
Alex Vinogradovs

#2Simon Riggs
simon@2ndQuadrant.com
In reply to: Alex Vinogradovs (#1)
Re: Rules slower than Dynamic SQL ?

On Mon, 2007-11-26 at 16:01 -0800, Alex Vinogradovs wrote:

I've got a data warehouse with pretty high rate of insert into
partitioned tables. What I've noticed, is that rule-based partitioning
seems to be somewhat slower than insertions made directly into
partitions through execution of dynamic SQL.

Is it really true ?

Depends how complex your rules are, but I think yes is the short answer.

--
Simon Riggs
2ndQuadrant http://www.2ndQuadrant.com

#3Jim Nasby
Jim.Nasby@BlueTreble.com
In reply to: Simon Riggs (#2)
Re: Rules slower than Dynamic SQL ?

On Nov 26, 2007, at 6:09 PM, Simon Riggs wrote:

On Mon, 2007-11-26 at 16:01 -0800, Alex Vinogradovs wrote:

I've got a data warehouse with pretty high rate of insert into
partitioned tables. What I've noticed, is that rule-based
partitioning
seems to be somewhat slower than insertions made directly into
partitions through execution of dynamic SQL.

Is it really true ?

Depends how complex your rules are, but I think yes is the short
answer.

My understanding is that each rule has to re-evaluate the query
that's being run. That's going to add some overhead to a simple
INSERT INTO table VALUES ... but if you think that's bad, try it with
an expensive INSERT INTO table SELECT statement!
--
Decibel!, aka Jim C. Nasby, Database Architect decibel@decibel.org
Give your computer some brain candy! www.distributed.net Team #1828

Attachments:

smime.p7sapplication/pkcs7-signature; name=smime.p7sDownload