Thread: Rules slower than Dynamic SQL ?

Rules slower than Dynamic SQL ?

From
Alex Vinogradovs
Date:
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


Re: Rules slower than Dynamic SQL ?

From
Simon Riggs
Date:
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


Re: Rules slower than Dynamic SQL ?

From
Decibel!
Date:
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



Attachment