THE SQL Server Blog Spot on the Web

Welcome to - The SQL Server blog spot on the web Sign in | |
in Search

SELECT Hints, Tips, Tricks FROM Hugo Kornelis WHERE RDBMS = 'SQL Server'

Bin packing part 3: Need for speed

This blog has moved! You can find this content at the following new location:

Published Saturday, January 12, 2008 12:24 AM by Hugo Kornelis


Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS



Joe Celko said:

Did you ever see some of the solutions for Codd's t-join problem?  It is a "best fit" situation  -- given classrooms wtih various numbers of seat5s and classes with various numbers of students, how do you assign rooms to classes with the least wasted space?  

January 13, 2008 12:41 PM

Hugo Kornelis said:

Hi Joe,

You mean those covered in your "SQL for smarties"? I checked those out when I tried to answer the usenet post that ultimately resulted in this series of blog post, but they didn't fit the problem - the solutions given in your book all relied on each classroom having a different size, and each class having a different number of students. Allso, none of those solution considered combining two classes in a single class room. (Which makes sense if you are teaching, but changes the problem from bin packing to best fit - a completely different problem, requiring a completely different solution).

In part 5 of this series, I'll present an updated version of the code I originally posted in answer to said usenet post, which is MUCH faster than any of the other alternatives, and yields very acceptable packing efficiency. This code does utiilize a best fit strategy as part of the algorithm. You must be familiar with it, since I once sent you a copy when you asked for material for the third (?) edition of "Smarties", but you ultimately chose not to include it. That's why I'm now writing this series.

Best, Hugo

January 14, 2008 3:26 AM

SELECT Hints, Tips, Tricks FROM Hugo Kornelis WHERE RDBMS = 'SQL Server' said:

Almost a year ago now, I started a series of blog post on the bin packing problem . But after the first

October 26, 2008 7:30 PM

SELECT Hints, Tips, Tricks FROM Hugo Kornelis WHERE RDBMS = 'SQL Server' said:

One of the most common techniques authors use to keep their readers interested is to leave them with

October 17, 2011 6:11 PM

ccc said:">">">

March 12, 2018 8:15 PM

aaaa said:

April 1, 2018 5:23 PM

Hassan said:

April 17, 2018 3:57 AM

fghfghf said:

April 18, 2018 3:04 AM

Leave a Comment


About Hugo Kornelis

Hugo is co-founder and R&D lead of perFact BV, a Dutch company that strives to improve analysis methods and to develop computer-aided tools that will generate completely functional applications from the analysis deliverable. The chosen platform for this development is SQL Server. In his spare time, Hugo likes to visit the SQL Server newsgroups, in order to share and enhance his knowledge of SQL Server.
Privacy Statement