Showing posts with label aproach. Show all posts
Showing posts with label aproach. Show all posts

Wednesday, March 28, 2012

Newbie question about initial table size

Hi all,

I've worked with informix for a very long time and this is my first aproach to sql server. I have an extremely simple design for a "small" database and at this moment I'm creating the tables, in informix I can assign a first extent and next extent size to the creation of the table so if your volume and growth analisys is good you can basically be sure that you will allways have contigous space on disk for your table. I'm readin BOL to see if I have that feature here but can't seem to find anything similar. Does that mean that my table data will be "fragmented" all over the primary and secondary files every time I load into them? Would it be a good practice to simulate the extents by creating a secondary file for each table with the size I require?

Any coments will be greatly appreciated :)

Luis TorresSpecifying that the db grow in reletively large chunks (so that the file doesn't grow very often) can reduce it's fragmentation. A seperate file for very large tables or for tables that get updated a lot is a good idea. Also you can set up amaintenance plan to run (daily, weekly, etc..) that can reorganize (optimize) the data & indexes.|||The size allocation for tables is done on the extent level. It means that if the last page of the initial extent is filled, a logically contiguous set of 8x8K pages is allocated for the new data. There may be fragmentation between the extents, and depending on your RAID level and array architecture the physical continuity of pages, but "logically" each extent is comprised of 8 continuous pages sitting in a row ;)|||Thanks pshisbey and rdjabarov for your comments, they are greatly appreciated :)

Luis Torres

Monday, February 20, 2012

Newb query on query :)

Hi,
Newb question here,
I have two tables (A & B) that I want to join and exclude the elements that
match, what would be the best aproach for this? thanks in advance. (BTW I'm
comparing 5 fields that have to match from each table: A1 = B1 And A2 = B2
... and so forth.)SELECT <columnList>
FROM TableA A
FULL OUTER JOIN TableB B
ON A.Col1 = b.Col1 And A.Col2 = B.Col2 AND ...
WHERE A.Col1 IS NULL OR B.Col1 IS NULL
Roji. P. Thomas
Net Asset Management
https://www.netassetmanagement.com
"Manny" <Manny@.discussions.microsoft.com> wrote in message
news:DA005CA3-B3FA-44C8-9F86-00CA28ACEFF2@.microsoft.com...
> Hi,
> Newb question here,
> I have two tables (A & B) that I want to join and exclude the elements
> that
> match, what would be the best aproach for this? thanks in advance. (BTW
> I'm
> comparing 5 fields that have to match from each table: A1 = B1 And A2 = B2
> ... and so forth.)
>|||Manny
> I have two tables (A & B) that I want to join and exclude the elements
that
> match,
You meant that all data from A that does not exist in B?
Look up LEFT/RIGHT/FULL join combinations in the BOL and WHERE NOT EXISTS
command as well.
"Manny" <Manny@.discussions.microsoft.com> wrote in message
news:DA005CA3-B3FA-44C8-9F86-00CA28ACEFF2@.microsoft.com...
> Hi,
> Newb question here,
> I have two tables (A & B) that I want to join and exclude the elements
that
> match, what would be the best aproach for this? thanks in advance. (BTW
I'm
> comparing 5 fields that have to match from each table: A1 = B1 And A2 = B2
> ... and so forth.)
>|||"Uri Dimant" wrote:
> You meant that all data from A that does not exist in B?
> Look up LEFT/RIGHT/FULL join combinations in the BOL and WHERE NOT EXISTS
> command as well.
Thanks Uri & Roji for your responses,
Yes, well I actually need 3 results:
1) Information that matches A & B (which was the easiest for me :)
2) Information that exists in A different from B (excluding the match)
3) Information that exists in B different from A (excluding the match)
I'll look up the join conditions you guys are sugesting, thanks again.