What was your coolest SQL optimization, on a slow performing query?

后端 未结 15 2152
遥遥无期
遥遥无期 2021-02-10 06:45

Just speaking to a colleague of mine. He was walking with a hop in his step, on the way to the coffee machine.

I asked him \"what\'s with the \'swarmy\' walk?\", he said

15条回答
  •  一整个雨季
    2021-02-10 07:33

    hey on the iphone which uses sqlite, i straight away reduced by database processing time from 40 seconds to 2 seconds with the use of exclusive write transactions... i was super happy doing this

    as this was my first experience of sql on an embedded device - quite different from the usual server related stuff (indexes, normalizations, etc etc)

    --- as far as servers go, indexes are real blessing. also if you take a bit of pain and get rid of as many nulls as you can in your table, you would be surprised with the performance gains - not many developers focus on nulls, they usually go with indexes and other documented stuff

    few other lesser exploited ways - using xml to process multiple batch inserts / updates / deletes at 1 go instead of doing 1 insert at a time - in sql 2005 this can be super cool

提交回复
热议问题