Quickest update methods
See original GitHub issueI am using this API in a chunk of software for automated testing and uploading resulting data to a spreadsheet to share.
I am noticing some lag on uploads and I can easily work around it, but I want to make sure I am not doing it wrong or there is a much quicker way. Essentially I am updating a cell at a time. The row can change often so I figured it would be easier to go by row number over cell name like “A1”.
workSheet.update_cell(conInfo[0],1,time.strftime("%Y-%m-%d %H:%M:%S", conInfo[1]))
workSheet.update_cell(conInfo[0],2,conInfo[2])
workSheet.update_cell(conInfo[0],3,conInfo[3])
workSheet.update_cell(conInfo[0],4,conInfo[4])
Issue Analytics
- State:
- Created 10 years ago
- Reactions:1
- Comments:11 (4 by maintainers)
Top Results From Across the Web
Methods for Updating Data
UPDATE is a batch operation that quickly modifies a small number of records. CREATE TABLE AS SELECT is a bulk operation that adds...
Read more >How to update an Android app - Android Police
How to update Android apps using the Google Play Store · Open the Google Play Store. · In the upper-right corner, tap your...
Read more >SQL Update statement Performance Tips
This article will show some beneficial tips about the SQL update statements ... Best practices to improve SQL update statement performance.
Read more >Fastest Updates in SQL Server - Natural Born Coder
In this method I submit updates that modify a single cell at a time but I can submit multiple updates in a transaction....
Read more >Fastest way to do mass update - sql - Stack Overflow
How are you doing the '50K batch records at a time' update? Is it with a stored procedure? If so, can you put...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Yes, this is many times faster, even with needing to get the objects first from the spreadsheet.
I included a chunk of my code just in case it helps others. Basically I have a queue of value that needs to get uploaded. One gets pulled off, I get the cell objects for that row, update the values from the from the queue tuple, and then upload the cell list.
Hi Travis,
If I get it right, you’re doing a bulk cells update and in this case the
Worksheet.update_cells
can be much faster.It works this way:
It is faster because there’s only one Google API call in case of
update_cells
(contrary to one API call for eachupdate_cell
call). Since Spreadsheets API is not very swift, the less API calls you make the faster it goes.