5 Tips to write speedy SQL Queries - PowerPoint PPT Presentation

About This Presentation
Title:

5 Tips to write speedy SQL Queries

Description:

5 Tips to write speedy SQL Queries 1.Create Small Batches of Data for Deletion and Updation 2. Use CASE instead of UPDATE 3. Avoid Negative Searches 4. Use the Exact Number of Columns 5. Use Fewer Cursors – PowerPoint PPT presentation

Number of Views:0
Slides: 8
Provided by: VirtualMQ
Category:
Tags:

less

Transcript and Presenter's Notes

Title: 5 Tips to write speedy SQL Queries


1
5 Tips to write speedy SQL Queries
2
1.Create Small Batches of Data for Deletion and
Updation
Use smaller data batches for updates and
deletions instead of large ones. This lessens
data loss risk during rollbacks and improves
concurrency, allowing uninterrupted work on
unaffected data while changes are made.
3
2. Use CASE instead of UPDATE
UPDATE statements in SQL involve lengthier table
writing due to logging, whereas inline CASE
statements decide preferred outcomes before
writing. This pre-determined decision-making
enhances speed by avoiding unnecessary writes,
optimizing the process.
4
3. Avoid Negative Searches
When you search for things that don't exist in
your database, it can make things slow down a
lot. To fix this, you can make the searches work
faster by changing how you search, especially
when you're dealing with a lot of data.
5
4. Use the Exact Number of Columns
When you create a select statement, make sure
you're asking for the right amount of information
for the number of things you're looking at. This
helps your search work faster and makes your
tasks speed up.
6
5. Use Fewer Cursors
Cursors can cause a lot of issues, especially
with how fast things happen. They can also lead
to things getting stuck and stopping other
actions from working. This can mess up how things
happen at the same time, making everything slow
down.
7
Follow us on social media for more!
Write a Comment
User Comments (0)
About PowerShow.com