Unix Technical Forum

how does view work??

This is a discussion on how does view work?? within the MySQL forums, part of the Database Server Software category; --> Hi all, I create a view for spectacles create view v_spectacles as select Sname,Sdate,Scategory,... from spectacles Where Sdate > ...


Go Back   Unix Technical Forum > Database Server Software > MySQL

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-28-2008, 11:27 AM
=?ISO-8859-1?Q?S=E9verin_Richard?=
 
Posts: n/a
Default how does view work??

Hi all,

I create a viewfor spectacles

create view v_spectacles as

select Sname,Sdate,Scategory,...
from spectacles

Where Sdate > now()

this view will change every day !!
But how does mysql refresh it. Is it a cron task, and how many time is
it launched?? which frequency, how to modify the frequency??

or this will not be dynamicaly refresh?

thx for suggestions.



Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 02-28-2008, 11:27 AM
Gordon Burditt
 
Posts: n/a
Default Re: how does view work??

>I create a viewfor spectacles
>
>create view v_spectacles as
>
> select Sname,Sdate,Scategory,...
> from spectacles
>
> Where Sdate > now()
>
>this view will change every day !!


The *view* changes or the *data* in the base table changes?
A view does not copy a bunch of data. A view is a query, and
changing a view involves changing the query.

>But how does mysql refresh it. Is it a cron task, and how many time is
>it launched?? which frequency, how to modify the frequency??


Something like:
select * from v_spectacles;
will return up-to-date data from the base table, whenever you run it.


>or this will not be dynamicaly refresh?


There isn't any operation "refresh" on a view.

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 02-28-2008, 11:28 AM
Jack Vamvas
 
Posts: n/a
Default Re: how does view work??

One of the purposes of a VIEW is to disguise compexity of queries .
So, you wouldn't necessarily use a VIEW for every query

--

Jack Vamvas
___________________________________
Search IT jobs from multiple sources- http://www.ITjobfeed.com/mySQL





"Séverin Richard" <severin.richard@free.fr> wrote in message
news:46f50853$0$24333$426a74cc@news.free.fr...
> Hi all,
>
> I create a viewfor spectacles
>
> create view v_spectacles as
>
> select Sname,Sdate,Scategory,...
> from spectacles
>
> Where Sdate > now()
>
> this view will change every day !!
> But how does mysql refresh it. Is it a cron task, and how many time is it
> launched?? which frequency, how to modify the frequency??
>
> or this will not be dynamicaly refresh?
>
> thx for suggestions.
>
>
>



Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
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
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 06:15 PM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com