0

While creating a dataset in BI Publisher, which one is more optimized?

Select * from <table_name>  
OR
select column1, column2 from table_name?

Is there any difference between mentioning specific columns and doing a select all statement? provided that all the columns are being used in the report.

Imran Hemani
  • 599
  • 3
  • 12
  • 27
  • If the resulting column are the same, then they are equally 'optimised'. But Select * has the unfortunate side effect that if you add a new column to the table it comes through automatically and that can create unexpected consequences. Beside select * is generally considered 'lazy' as in you haven't considered what columns you actually need. – Nick.Mc Oct 28 '16 at 04:39

2 Answers2

1
select column1, column2 from table_name

Above should be used, as the column names would be mapped to the names used in your .rtf file.

We use a .xdo or .xdm file for mapping of DB columns to the variables used in .rtf file.

FallAndLearn
  • 4,035
  • 1
  • 18
  • 24
1

I agree with user FallAndLearn. But regardless of whether .rtf file is being used, naming the columns explicitly is always recommended from an optimization and SQL tuning perspective.

Community
  • 1
  • 1
cdabel
  • 461
  • 9
  • 21