MySQL optimizations; free Opera browser license
- Get link
- X
- Other Apps
OK, I know that there is a large overhead for doing single table inserts, even maintaining a pool of connections. This little fact was very obvious this morning: I had a one-shot little program that generates data for about 5 million rows in a database table. The calculations themselves take a while (about 5 minutes on my PC), ignoring database access. Last night, right before I went to bed, I added a few lines of ad-hoc JDBC calls to write out my 5 million rows after everything was calculated in memory. I woke up this morning and it was still running.
So much for being a little sloppy, even for a one-shot (throw it away after it runs) program. I re-wrote it batching up just 2000 inserts at a time (insert into... values (..), (..), (..)...) and the database access code ran in just 20 minutes. After the data was added, it took another two minutes to index the table (obviously you want to do this *after* adding the data). I made a note to myself to review my production code - I think that I almost always batch up inserts when appropriate, but I want to make doubly sure!
re: free Opera browser license: as seen on Slashdot: a short term free license giveaway. I grabbed a free license so I have one more popular browser to test my web applications against.
So much for being a little sloppy, even for a one-shot (throw it away after it runs) program. I re-wrote it batching up just 2000 inserts at a time (insert into... values (..), (..), (..)...) and the database access code ran in just 20 minutes. After the data was added, it took another two minutes to index the table (obviously you want to do this *after* adding the data). I made a note to myself to review my production code - I think that I almost always batch up inserts when appropriate, but I want to make doubly sure!
re: free Opera browser license: as seen on Slashdot: a short term free license giveaway. I grabbed a free license so I have one more popular browser to test my web applications against.
- Get link
- X
- Other Apps
Popular posts from this blog
I am moving back to the Google platform, less excited by what Apple is offering
I have been been playing with the Apple Intelligence beta’s in iPadOS and macOS and while I like the direction Apple is heading I am getting more use from Google’s Gemini, both for general analysis of very large input contexts, as well as effective integration my content in Gmail, Google Calendar, and Google Docs. While I find the latest Pixel phone to be compelling, I will stick with Apple hardware since I don’t want to take the time to move my data and general workflow to a Pixel phone. The iPhone is the strongest lock-in that Apple has on me because of the time investment to change. The main reason I am feeling less interested in the Apple ecosystem and platform is that I believe that our present day work flows are intimately wrapped up with the effective use of LLMs, and it is crazy to limit oneself to just one or two vendors. I rely on running local models on Ollama, super fast APIs from Groq (I love Groq for running most of the better open weight models), and other APIs from Mist...
AI update: The new Deepseek-R1 reasoning language model, Bytedance's Trae IDE, and my new book
I spent a few days experimenting with Cursor last week. Bytedance's Trae IDE is very similar and is currently free to use with Claude Sonnet 3.5 and GPT-4o: https://www.trae.ai/home I would like to use Trae with my own API accounts but currently Bytedance is paying for LLM costs. I have been experimenting with the qwen2.5 and qwen2.5-coder models that easily run on my M2Pro 32G Mac. For reasoning I have been going back to using OpenAI O1 and Claude Sonnet, but after my preliminary tests with Deepseek-R1, I feel like I can do most everything now on my personal computer. I am using: ollama run deepseek-r1:32b I recently published my new book “ Ollama in Action: Building Safe, Private AI with LLMs, Function Calling and Agents ” that can be read free online at https://leanpub.com/ollama/read
Getting closer to AGI? Google's NoteBookLM and Replit's AI Coding Agent
Putting "closer to AGI?" in a blog title might border on being clickbait, but I will argue that it is not! I have mostly earned my living in the field of AI since 1982 and I argue that the existence of better AI driven products and the accelerating rate of progress in research, that we are raising the bar on what we consider AGI to be. I have had my mind blown twice in the last week: Today I took the PDF for my book "Practical Artificial Intelligence Programming With Clojure ( you can read it free online here ) and used it to create a notebook in Google's NotebookLM and asked for a generated 8 minute podcast. This experimental app created a podcast with two people discussing my book accurately and showing wonderful knowledge of technology. If you want to listen to the audio track that Google's NotebookLM created, here is a link to the WAV audio file Last week I signed up for a one year plan on Replit.com after trying the web based IDE for Haskell and Python...
Comments
Post a Comment