indexes & create table performance


indexes & create table performance

Does index choice have an impact on performance of a create table statement?  E.g.  if I have a create a table with data with a single column non-unique primary index, will that statement run faster than the same create statement with a multi column unique primary index?  Does skewness impact performance of a create table statement?


Re: indexes & create table performance

Create table with data, as far as I understand is 3 part operation.

1) Create table

2) Select data from table B

3) insert data into table C

I dont think insert has a major impact on the definition of PI but select has. It more depends on the index that is defined on the source table that will impact the performance.

Coming onto sweness, yes skewness of the source table will have an impact as the skewed amps will get over worked while rest of the amps are underworked. Skewness can also lead to spooling out of the query.



Re: indexes & create table performance

Thanks.  My main reason for asking is that query performance (select on its own) is very fast...15 seconds or so.  Creation of the table (e.g. create mytable as (select etc etc etc) with data primary index etc etc) for the same query is taking 4 or 5 minutes, so my thought was that the lag in completion time was due to indexes as opposed to select.