Re: Set Complement and Temporary Tables




John Vinson wrote:
On 29 Dec 2006 16:02:38 -0800, JohnCreighton_@xxxxxxxxxxx wrote:

Obviously If I already had a table of
such integers I could do this but that would seem like a waste of
memory.

Disk is cheap. A table with numbers 1 to 10000 takes about 80kbytes
(40 for the table, 40 for the index) plus a little bit of overhead; it
doesn't take ANY memory, except when it's being used. You can have
2,000 kbytes in a .mdb file - a Numbers table is very useful and very
cheap.

John W. Vinson[MVP]

That is a good point. I'll consider that in the future. Anyway I came
up with an alternative way of finding missing numbers:

SELECT summary_index.id, summary_index_1.id
FROM summary_index
LEFT JOIN summary_index As summary_index_1
ON summary_index.id+1=summary_index_1.id
Where ISNULL(summary_index_1.id)

This query finds the start of the interval of missing numbers in the
query or table summary_index. A similar query could be constructed to
find the end point. I would still like to know if there are short hand
ways to generate a sequence or series table incase I need it in the
future.

.



Relevant Pages

  • Re: OSX vs XP
    ... > There is either swapping or a waste of RAM. ... > is loaded faster than data that hasn't been in memory before at all. ... We wouldn't need GB of RAM in systems if people didn't think ... Fortunately it's cheap. ...
    (comp.sys.mac.advocacy)
  • Re: Code density and performance?
    ... Heck, IPF memory requirements make ... |>> |> quadword. ... |> What wasn't at that point in time - memory cheap, or aligned accesses ...
    (comp.arch)
  • Re: Recommend small, 2-3 year old laptop
    ... > could pick up cheap on Ebay. ... What I'm after is a small laptop, ... M300 should come into your budget via eBay. ... Portege 3400 series, watch out for the installed memory, because upgrading ...
    (uk.comp.sys.laptops)
  • Re: concurrency, threads and objects
    ... ClassA objects and 100 Thread objects. ... worry about resources (cpu, memory etc.), because its so cheap. ... Objects are cheap. ...
    (comp.lang.java.programmer)
  • Re: Recommend small, 2-3 year old laptop
    ... >> could pick up cheap on Ebay. ... > external with a small laptop), a decent hard-drive and memory ... > M300 should come into your budget via eBay. ... > Portege 3400 series, watch out for the installed memory, because upgrading ...
    (uk.comp.sys.laptops)