Sybase NNTP forums - End Of Life (EOL)

The NNTP forums from Sybase - forums.sybase.com - are now closed.

All new questions should be directed to the appropriate forum at the SAP Community Network (SCN).

Individual products have links to the respective forums on SCN, or you can go to SCN and search for your product in the search box (upper right corner) to find your specific developer center.

Union and text/image

6 posts in Product Futures Discussion Last posting was on 2002-01-24 21:25:18.0Z
Mike Harrold Posted on 2002-01-24 16:14:20.0Z
Subject: Union and text/image
X-Newsreader: trn 4.0-test75 (Feb 13, 2001)
From: ao@shell.core.com (Mike Harrold)
Originator: ao@shell.core.com (Mike Harrold)
Message-ID: <dKg8tIPpBHA.123@forums.sybase.com>
Newsgroups: sybase.public.ase.product_futures_discussion
Date: Thu, 24 Jan 2002 11:14:20 -0500
Lines: 3
NNTP-Posting-Host: shell.voyager.net 169.207.1.89
Path: forums-1-dub!forums-master.sybase.com!forums.sybase.com!not-for-mail
Xref: forums-1-dub sybase.public.ase.product_futures_discussion:879
Article PK: 94407

Any chance of getting the UNION command work with text/image columns?

/Mike


Pablo Sanchez Posted on 2002-01-24 16:13:44.0Z
From: "Pablo Sanchez" <pablo@dev.null>
References: <dKg8tIPpBHA.123@forums.sybase.com>
Subject: Re: Union and text/image
Date: Thu, 24 Jan 2002 09:13:44 -0700
Lines: 19
Organization: High-Performance Database Engineering
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2600.0000
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000
Message-ID: <enwUaLPpBHA.189@forums.sybase.com>
Newsgroups: sybase.public.ase.product_futures_discussion
NNTP-Posting-Host: 207.225.105.222
Path: forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.ase.product_futures_discussion:878
Article PK: 94406


"Mike Harrold" <ao@shell.core.com> wrote in message
news:dKg8tIPpBHA.123@forums.sybase.com...
>
> Any chance of getting the UNION command work with text/image
columns?
>

Hi Mike,

Would you elaborate more on how you plan on using it? I think that
always help Sybase figuring out priority. :)
--
Pablo Sanchez, High-Performance Database Engineering
www.hpdbe.com
Independent Contractor, available for short-term and long-term
contracts


Mike Harrold Posted on 2002-01-24 18:17:03.0Z
Subject: Re: Union and text/image
References: <dKg8tIPpBHA.123@forums.sybase.com> <enwUaLPpBHA.189@forums.sybase.com>
X-Newsreader: trn 4.0-test75 (Feb 13, 2001)
From: ao@shell.core.com (Mike Harrold)
Originator: ao@shell.core.com (Mike Harrold)
Message-ID: <wYuBTNQpBHA.140@forums.sybase.com>
Newsgroups: sybase.public.ase.product_futures_discussion
Date: Thu, 24 Jan 2002 13:17:03 -0500
Lines: 49
NNTP-Posting-Host: shell.voyager.net 169.207.1.89
Path: forums-1-dub!forums-master.sybase.com!forums.sybase.com!not-for-mail
Xref: forums-1-dub sybase.public.ase.product_futures_discussion:876
Article PK: 94404

In article <enwUaLPpBHA.189@forums.sybase.com>,

Pablo Sanchez <pablo@dev.null> wrote:
>
>
>"Mike Harrold" <ao@shell.core.com> wrote in message
>news:dKg8tIPpBHA.123@forums.sybase.com...
>>
>> Any chance of getting the UNION command work with text/image
>columns?
>>
>
>Hi Mike,
>
>Would you elaborate more on how you plan on using it? I think that
>always help Sybase figuring out priority. :)

Good question.

How about emulating Oracle's range-based partitioning?

Here's an example that is similar to something we're looking at doing
right now. It also shows how parts of the table could be "read only."

There is a large table that is essentially "read-only". There is batch
processing that adds rows to the table infrequently. No rows are deleted
during normal usage. (There's always a chance this could be necessary as
part of special maintenance.)

What I'd like to to is set up a series of sub-tables to split out this
one table. This will allow me to put the oldest data in a different
database to the new stuff. As the old data is read-only, and new data is
added in sequential primary key order (eg, the primary key for the next
record is the primary key of the last record + 1), the data in the old
table wouldn't need backed up regularly since it doesn't change. We
could resort to backing these up only once a month, for instance.

A view using UNION across the sub tables would produce a master table
that the application would use for searching. However, what if one of
the columns is a text/image column? In our case, the main data would be
stored as an image column as it's potentially very large.

The batch inserts would be handled by inserting them either into the
latest table (containing the most recent new entries), or into an
entirely different table that had an insert trigger which then placed
the data into the correct table.

Does this make any sense?

/Mike


Bret Halford Posted on 2002-01-24 18:16:06.0Z
Message-ID: <3C504F66.BF18ACFF@sybase.com>
Date: Thu, 24 Jan 2002 11:16:06 -0700
From: Bret Halford <bret@sybase.com>
Organization: Sybase, Inc.
X-Mailer: Mozilla 4.76 [en] (Windows NT 5.0; U)
X-Accept-Language: en
MIME-Version: 1.0
Subject: Re: Union and text/image
References: <dKg8tIPpBHA.123@forums.sybase.com> <enwUaLPpBHA.189@forums.sybase.com> <wYuBTNQpBHA.140@forums.sybase.com>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Newsgroups: sybase.public.ase.product_futures_discussion
Lines: 56
NNTP-Posting-Host: 157.133.80.180
Path: forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.ase.product_futures_discussion:875
Article PK: 94403


Mike Harrold wrote:

> In article <enwUaLPpBHA.189@forums.sybase.com>,
> Pablo Sanchez <pablo@dev.null> wrote:
> >
> >
> >"Mike Harrold" <ao@shell.core.com> wrote in message
> >news:dKg8tIPpBHA.123@forums.sybase.com...
> >>
> >> Any chance of getting the UNION command work with text/image
> >columns?
> >>
> >
> >Hi Mike,
> >
> >Would you elaborate more on how you plan on using it? I think that
> >always help Sybase figuring out priority. :)
>
> Good question.
>
> How about emulating Oracle's range-based partitioning?
>
> Here's an example that is similar to something we're looking at doing
> right now. It also shows how parts of the table could be "read only."
>
> There is a large table that is essentially "read-only". There is batch
> processing that adds rows to the table infrequently. No rows are deleted
> during normal usage. (There's always a chance this could be necessary as
> part of special maintenance.)
>
> What I'd like to to is set up a series of sub-tables to split out this
> one table. This will allow me to put the oldest data in a different
> database to the new stuff. As the old data is read-only, and new data is
> added in sequential primary key order (eg, the primary key for the next
> record is the primary key of the last record + 1), the data in the old
> table wouldn't need backed up regularly since it doesn't change. We
> could resort to backing these up only once a month, for instance.
>
> A view using UNION across the sub tables would produce a master table
> that the application would use for searching. However, what if one of
> the columns is a text/image column? In our case, the main data would be
> stored as an image column as it's potentially very large.
>
> The batch inserts would be handled by inserting them either into the
> latest table (containing the most recent new entries), or into an
> entirely different table that had an insert trigger which then placed
> the data into the correct table.
>
> Does this make any sense?
>
> /Mike

Are you concerned about having duplicate rows in the subtables?
If not, UNION ALL is allowed with text/image and should work.

-bret


Mike Harrold Posted on 2002-01-24 18:29:42.0Z
Subject: Re: Union and text/image
References: <dKg8tIPpBHA.123@forums.sybase.com> <enwUaLPpBHA.189@forums.sybase.com> <wYuBTNQpBHA.140@forums.sybase.com> <3C504F66.BF18ACFF@sybase.com>
X-Newsreader: trn 4.0-test75 (Feb 13, 2001)
From: ao@shell.core.com (Mike Harrold)
Originator: ao@shell.core.com (Mike Harrold)
Message-ID: <jkVPXUQpBHA.313@forums.sybase.com>
Newsgroups: sybase.public.ase.product_futures_discussion
Date: Thu, 24 Jan 2002 13:29:42 -0500
Lines: 63
NNTP-Posting-Host: shell.voyager.net 169.207.1.89
Path: forums-1-dub!forums-master.sybase.com!forums.sybase.com!not-for-mail
Xref: forums-1-dub sybase.public.ase.product_futures_discussion:873
Article PK: 94401

In article <3C504F66.BF18ACFF@sybase.com>,

Bret Halford <bret@sybase.com> wrote:
>
>
>
>Mike Harrold wrote:
>
>> In article <enwUaLPpBHA.189@forums.sybase.com>,
>> Pablo Sanchez <pablo@dev.null> wrote:
>> >
>> >
>> >"Mike Harrold" <ao@shell.core.com> wrote in message
>> >news:dKg8tIPpBHA.123@forums.sybase.com...
>> >>
>> >> Any chance of getting the UNION command work with text/image
>> >columns?
>> >>
>> >
>> >Hi Mike,
>> >
>> >Would you elaborate more on how you plan on using it? I think that
>> >always help Sybase figuring out priority. :)
>>
>> Good question.
>>
>> How about emulating Oracle's range-based partitioning?
>>
>> Here's an example that is similar to something we're looking at doing
>> right now. It also shows how parts of the table could be "read only."
>>
>> There is a large table that is essentially "read-only". There is batch
>> processing that adds rows to the table infrequently. No rows are deleted
>> during normal usage. (There's always a chance this could be necessary as
>> part of special maintenance.)
>>
>> What I'd like to to is set up a series of sub-tables to split out this
>> one table. This will allow me to put the oldest data in a different
>> database to the new stuff. As the old data is read-only, and new data is
>> added in sequential primary key order (eg, the primary key for the next
>> record is the primary key of the last record + 1), the data in the old
>> table wouldn't need backed up regularly since it doesn't change. We
>> could resort to backing these up only once a month, for instance.
>>
>> A view using UNION across the sub tables would produce a master table
>> that the application would use for searching. However, what if one of
>> the columns is a text/image column? In our case, the main data would be
>> stored as an image column as it's potentially very large.
>>
>> The batch inserts would be handled by inserting them either into the
>> latest table (containing the most recent new entries), or into an
>> entirely different table that had an insert trigger which then placed
>> the data into the correct table.
>>
>> Does this make any sense?
>>
>> /Mike
>
>Are you concerned about having duplicate rows in the subtables?

Actually no, because the data source in this instance guarantees no
duplicates.

>If not, UNION ALL is allowed with text/image and should work.

So it does. Heh. Fast turn around, and I didn't even need to upgrade :)

/Mike


Pablo Sanchez Posted on 2002-01-24 21:25:18.0Z
From: "Pablo Sanchez" <pablo@dev.null>
References: <dKg8tIPpBHA.123@forums.sybase.com> <enwUaLPpBHA.189@forums.sybase.com> <wYuBTNQpBHA.140@forums.sybase.com> <3C504F66.BF18ACFF@sybase.com> <jkVPXUQpBHA.313@forums.sybase.com>
Subject: Re: Union and text/image
Date: Thu, 24 Jan 2002 14:25:18 -0700
Lines: 19
Organization: High-Performance Database Engineering
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2600.0000
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000
Message-ID: <9F$#g5RpBHA.189@forums.sybase.com>
Newsgroups: sybase.public.ase.product_futures_discussion
NNTP-Posting-Host: 207.225.105.222
Path: forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.ase.product_futures_discussion:863
Article PK: 94390


"Mike Harrold" <ao@shell.core.com> wrote in message
news:jkVPXUQpBHA.313@forums.sybase.com...
> In article <3C504F66.BF18ACFF@sybase.com>,
> Bret Halford <bret@sybase.com> wrote:
> >
> >If not, UNION ALL is allowed with text/image and should work.
>
> So it does. Heh. Fast turn around, and I didn't even need to upgrade

:)

Darn it Bret, another sale lost!
--
Pablo Sanchez, High-Performance Database Engineering
www.hpdbe.com
Independent Contractor, available for short-term and long-term
contracts