SET is the ANSI standard way of assigning values to variables, and SELECT is not. But you can use SELECT to assign values to more than one variable at a time. SET allows you to assign data to only one variable at a time. So that in performance is where SELECT will be a winner.
For more detail and examples refer to: Difference between SET and SELECT when assigning values to variables
Related Contents:
- Why is appending to a list bad?
- When should I use CROSS APPLY over INNER JOIN?
- Performance optimization strategies of last resort [closed]
- What’s the most efficient way to test if two ranges overlap?
- Is it safe to shallow clone with –depth 1, create commits, and pull updates again?
- Why JSF calls getters multiple times
- How to find the kth largest element in an unsorted array of length n in O(n)?
- postgresql COUNT(DISTINCT …) very slow
- SQL JOIN vs IN performance?
- Approximate cost to access various caches and main memory?
- Speed up the loop operation in R
- Why is MATLAB so fast in matrix multiplication?
- What is considered a good response time for a dynamic, personalized web application? [closed]
- Has anyone actually implemented a Fibonacci-Heap efficiently?
- Multiple INSERT statements vs. single INSERT with multiple VALUES
- What is the difference between spark.sql.shuffle.partitions and spark.default.parallelism?
- How to analyze golang memory?
- atomic operation cost
- Why is vectorization, faster in general, than loops?
- If registers are so blazingly fast, why don’t we have more of them?
- React Navigation vs. React Native Navigation [closed]
- FreeBSD performance tuning: Sysctl parameter, loader.conf, kernel
- To improve SQL performance, why not just put lots of RAM rather than having faster hard disks?
- What does “low profile” stand for, connected to hardware?
- Performance difference between compiled and binary linux distributions/packages
- Which bots and spiders should I block in robots.txt?
- First days online : how not to kill your site
- Is calculating IOPS for ZFS RAIDZ different then calculating IOPS for RAID5 & RAID6?
- Why is FileZilla so much faster than PSFTP?
- What’s the fastest filesystem for developer builds?
- pg_restore taking much longer than pg_dump
- PostgreSQL temporary tables
- Performance of bcp/BULK INSERT vs. Table-Valued Parameters
- Fast query runs slow in SSRS
- Jmeter alternative [closed]
- LOWER LIKE vs iLIKE
- translate3d vs translate performance
- Performance tips for making Visual Studio 2010 faster? [closed]
- what does O(N) mean [duplicate]
- Why is Solr so much faster than Postgres?
- Most Efficient Way to Create an Index in Postgres
- Why when I transfer a file through SFTP, it takes longer than FTP?
- MongoDB ‘count()’ is very slow. How do we refine/work around with it?
- Faster way to initialize arrays via empty matrix multiplication? (Matlab)
- Why is this SSE code 6 times slower without VZEROUPPER on Skylake?
- How are cache memories shared in multicore Intel CPUs?
- preallocate list in R
- JMeter understanding ramp-up
- Improving Postgres psycopg2 query performance for Python to the same level of Java’s JDBC driver
- What is the difference between latency, bandwidth and throughput?