While loading the database with some initial reference data (about 1GB), using one-off code that got fixed as I went along, I somehow managed to "lose" some PK values, because sequences do not roll back if accessed with nextval.
To simplify, it sounds like you're worried that a list of numbers with a gap (1, 2, 3, 7, 8, 9) won't sort as efficiently as a list without a gap (1, 2, 3, 4, 5, 6). I believe you don't need to worry about this, because a) it's not going to be an issue, and b) anyway, it's the database's problem.
It was at this point that I realised I needed DBIx::Class, otherwise I would have layers of raw SQL hiding in any homegrown DBMS/Perl framework and that had to be avoided at all costs.
Hmm. I don't understand how this follows from the issue of having gaps in your Primary Key values. DBIx::Class is a fine module, and I'm sure it will work well .. but having raw SQL code in your codebase isn't a terrible situation.
Looking forward to hearing about the launch! :)
Alex / talexb / Toronto
Thanks PJ. We owe you so much. Groklaw -- RIP -- 2003 to 2013.
-
Are you posting in the right place? Check out Where do I post X? to know for sure.
-
Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
<code> <a> <b> <big>
<blockquote> <br /> <dd>
<dl> <dt> <em> <font>
<h1> <h2> <h3> <h4>
<h5> <h6> <hr /> <i>
<li> <nbsp> <ol> <p>
<small> <strike> <strong>
<sub> <sup> <table>
<td> <th> <tr> <tt>
<u> <ul>
-
Snippets of code should be wrapped in
<code> tags not
<pre> tags. In fact, <pre>
tags should generally be avoided. If they must
be used, extreme care should be
taken to ensure that their contents do not
have long lines (<70 chars), in order to prevent
horizontal scrolling (and possible janitor
intervention).
-
Want more info? How to link
or How to display code and escape characters
are good places to start.
|