dbTalk Databases Forums  

Materialized views and sort_collation

sybase.public.sqlanywhere.general sybase.public.sqlanywhere.general


Discuss Materialized views and sort_collation in the sybase.public.sqlanywhere.general forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Dan Konigsbach
 
Posts: n/a

Default Materialized views and sort_collation - 09-24-2009 , 12:38 PM






Could someone help me understand the difference between sort_collation
= Internal and sort_collation IS NULL?

The documented allowed values for the database option sort_collation
are: Internal, collation_name, or collation_id. It defaults to
Internal, which leaves ORDER BY clauses unchanged.

On the other hand, to create a materialized view, the database must
have sort_collation=Null, which is not listed as an allowed value.

So:
1) Conceptually, it seems that Internal and NULL would mean the same
thing: leave ORDER BY clauses unchanged. Is there a difference I'm
overlooking?
2) If you've never even thought about sort_collation, you've got the
default setting sort_collation = Internal. Could materialized views
be made to accept this default setting, instead of requiring you to
change it to NULL?

Thanks VERY much,
Dan Konigsbach

Reply With Quote
  #2  
Old   
Nick Elson [Sybase iAnywhere]
 
Posts: n/a

Default Re: Materialized views and sort_collation - 09-28-2009 , 06:28 PM






I don't know if there was ever supposed to be a difference.
NULL is actually not documented as a valid setting so it
should default to internal.

It may be you are experiencing a side-effect of a bug
that was fixed .... and if so you may need to recreate
you mat. views.

[If not repost with exact version/build and ebf history]

From the 10.0.1 readmes:
-------------------------------
================(Build #3470 - Engineering Case
#462307)================
The setting for the option Sort_collation was not used when ordering NCHAR,
NVARCHAR or LONG NVARCHAR values. This has been fixed.

Note, if a materialized view was created with NCHAR values, this change
may alter the results of the materialized view. Such views should be
recomputed
after this change is applied.



"Dan Konigsbach" <dkonigsbach (AT) gmail (DOT) com> wrote

Quote:
Could someone help me understand the difference between sort_collation
= Internal and sort_collation IS NULL?

The documented allowed values for the database option sort_collation
are: Internal, collation_name, or collation_id. It defaults to
Internal, which leaves ORDER BY clauses unchanged.

On the other hand, to create a materialized view, the database must
have sort_collation=Null, which is not listed as an allowed value.

So:
1) Conceptually, it seems that Internal and NULL would mean the same
thing: leave ORDER BY clauses unchanged. Is there a difference I'm
overlooking?
2) If you've never even thought about sort_collation, you've got the
default setting sort_collation = Internal. Could materialized views
be made to accept this default setting, instead of requiring you to
change it to NULL?

Thanks VERY much,
Dan Konigsbach

Reply With Quote
  #3  
Old   
Dan Konigsbach
 
Posts: n/a

Default Re: Materialized views and sort_collation - 09-30-2009 , 11:26 AM



Thanks for the response, Nick!

The developer encountered this problem in 11.0.0.1264. After
upgrading to 11.0.1.2308, materialized views now happily accept
sort_collation set to Internal, which is what you'd want.

There is still a vestige of this issue: The help topic "SQL Anywhere
Server - SQL Usage » Creating Databases » Working with database
objects » Working with materialized views » Restrictions on
materialized views" still references "sort_collation=Null". That's in
both the distributed 11.0.1.2308 help file and also in
DocCommentXchange.

Thanks,
Dan

Reply With Quote
  #4  
Old   
Nick Elson [Sybase iAnywhere]
 
Posts: n/a

Default Re: Materialized views and sort_collation - 09-30-2009 , 05:19 PM



Thanks for that doc tip ... I've posted that information to
the team ...

"Dan Konigsbach" <dkonigsbach (AT) gmail (DOT) com> wrote

Thanks for the response, Nick!

The developer encountered this problem in 11.0.0.1264. After
upgrading to 11.0.1.2308, materialized views now happily accept
sort_collation set to Internal, which is what you'd want.

There is still a vestige of this issue: The help topic "SQL Anywhere
Server - SQL Usage » Creating Databases » Working with database
objects » Working with materialized views » Restrictions on
materialized views" still references "sort_collation=Null". That's in
both the distributed 11.0.1.2308 help file and also in
DocCommentXchange.

Thanks,
Dan

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.