The Vertica Forum recently got a makeover! Let us know what you think by filling out this short, anonymous survey.
Please take this survey to help us learn more about how you use third party tools. Your input is greatly appreciated!

Create Table vs Insert Into /*+direct*/


What is the difference between:

  • create table
  • insert into /+direct/

I did some tests and have difference (dramatic) between above 2 scenarios:

  • create table took abot 700s
  • insert into took about 10000s

I used the same sql statement.



  • I just checked...
    Create table is creating projection with following order and segmentation:

    ORDER BY test_col.col1,
    SEGMENTED BY hash(test_col.col1, test_col.col2, test_col.col4, test_col.col3)

    I use col1 as my key in queries, so i thought that it will be the best to order by it (col1). But then it tooks a lot of time...

    So its better to have more columns in order clause ?

Leave a Comment

BoldItalicStrikethroughOrdered listUnordered list
Align leftAlign centerAlign rightToggle HTML viewToggle full pageToggle lights
Drop image/file