SQL optimization issues [closed] - sql

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
I have to optimize a bunch of many table and data included SQL queries, and I would like to ask some questions:
1) There are situations, when the same functions are needed in different queries. Which results lower processor time: if the functions are calculated separately in every queries or if it is calculated in one query, and they are linked through each other?
2) When creating queries, which is better in giving table relationships? If I have 1 main query, and all of the other queries are related to that, or if there is a serial connection between all the tables?
The 2 main tables are relatively big (~30MB) Excel-tables.
Thank you in advance.

Related

SSIS Derived Column vs SQL Update Performance [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 4 years ago.
Improve this question
I am trying to determine which is faster in a SSIS package. I have multiple (100's) csv files that have about 150 columns of scientific precision data (38,20) for different types of scenarios. The table is layed out the same way with some other columns. The data sometimes comes in with whitespace/empty data and I have to change this to null for a data conversion at a later time.
I am trying to determine if I should go with derived columns (150) to turn the data into nulls or use a massive sql update statement for updating each column.
Thoughts? Thank you.
Generally speaking, any time you have a choice of doing a transformation in either the SSIS dataflow, or in TSQL, the TSQL way is usually faster.
However, that's only generally speaking, and the only way to know if it holds true in any specific case is to test it.

What does 'indexes' do in sql query [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
I come to know that this is used to speed up data retrieval..I like to know more about it .Thanks .
Indexing is a way of sorting a number of records on multiple fields. Creating an index on a field in a table creates another data structure which holds the field value, and pointer to the record it relates to. This index structure is then sorted, allowing Binary Searches to be performed on it.

sql server - are there any advantages to making a table out a view [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 8 years ago.
Improve this question
I have a crystal report connected to a sql server DB that uses complex statistical queries.
What are the disadvantages or advantages, especially in terms of speed, to converting views into tables to run in the reports.
For sql server I know that tables take up more space.
thanks
Disadvantages:
occupies more spaces.
processing time for the table to load time.
Advantages:
faster access

Databases: What is a HANA delta table? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 8 years ago.
Improve this question
What is a delta table in SAP HANA databases?
From initial googling, I understood that these tables are some kind of intermediate tables to help data go from one state to another. But when exactly are they used? How are they different from "normal" tables in HANA databases?
Delta tables are a SAP-HANA specific technique to speed up write operations in the database.
Tables in SAP HANA usually use the column store, which is read-optimized. When writing data to a column-store table, this data is first stored in the delta-space for that table; this delta-space is periodically merged into the column store.
See e.g. https://cookbook.experiencesaphana.com/bw/operating-bw-on-hana/hana-database-administration/system-configuration/delta-merge/column-store/ for more details.
"Delta" is commonly used to mean "difference". A delta table would show only the differences between two tables, the records that were added/deleted/changed during the new process. It's a way to test new code to see what changes it caused.

powershell multi valued variables or sql table [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 8 years ago.
Improve this question
i'm wanting to write data into memory only for a temp time. the format is essentially the same as an sql table with say 5 columns and 1,000 rows, give or take. simply i want to store this data and run queries against it to make calculations, sorting it, querying it to then produce chart reports and excel data.
I looked at custom psobjects and then sql and i can't see why i'd use custom psobjects over sql, what do you think?
I also couldn't see that adding multiple rows as such, using psobjects was as straight forward as adding another row in sql.
thanks
steve
I guess it depends on what you're more comfortable with, but if you're going to do it in Powershell then using PS custom objects seems like a logical choice since the cmdlets were designed to work with those.