RE: Performance Improvements with VIEW

2013-07-30 Thread Rick James
t kind of things are you doing? If Data Warehouse 'reports', consider Summary Tables. Non-trivial, but the 'minutes' will become 'seconds'. > -Original Message- > From: Bruce Ferrell [mailto:bferr...@baywinds.org] > Sent: Tuesday, July 30, 2013 7:08 A

Re: Performance Improvements with VIEW

2013-07-30 Thread Bruce Ferrell
s in the table. But it's taking more than 15 Minutes to execute the procedure. When executing the Procedure in the process list I am getting 3 states like 'Sending data', 'Sorting Result' and 'Sending data' again. Then I created one view by using the base table

Re: Performance Improvements with VIEW

2013-07-30 Thread Andrew Moore
I think you're reducing the amount of rows referenced throughout the proc using the view. This might be where you're seeing a performance difference. If you create an innodb table where the structure and row count match the view maybe you'll see another difference? I'll wait f

Performance Improvements with VIEW

2013-07-30 Thread Manivannan S.
Minutes to execute the procedure. When executing the Procedure in the process list I am getting 3 states like 'Sending data', 'Sorting Result' and 'Sending data' again. Then I created one view by using the base table and updated the procedure by replacing that vi

Re: function INTERVAL in view

2012-09-18 Thread hsv
>>>> 2012/09/17 13:11 -0500, Peter Brawley >>>> Looks like a bug. Report it? <<<<<<<< It was reported: Bug #45346 VIEW containing INTERVAL(...) can be created but does not work Submitted: 5 Jun 2009 10:00 Modified: 5 Jun 2009 10:16 Severity:S3 (Non

RE: function INTERVAL in view

2012-09-17 Thread Steven Staples
> -Original Message- > From: Rick James [mailto:rja...@yahoo-inc.com] > Sent: September 17, 2012 3:04 PM > To: peter.braw...@earthlink.net; mysql@lists.mysql.com > Subject: RE: function INTERVAL in view > > INTERVAL is a keyword. This is probably the root of the h

RE: function INTERVAL in view

2012-09-17 Thread Rick James
nction INTERVAL in view > > n 2012-09-17 12:58 PM, h...@tbbs.net wrote: > > My MySQL is of version 5.5.8-log. I find I cannot save a query with > INTERVAL in a view: redundant round brackets are added. If the query is > > > > SELECT INTERVAL(1, 2, 3, 4) > >

Re: function INTERVAL in view

2012-09-17 Thread Peter Brawley
n 2012-09-17 12:58 PM, h...@tbbs.net wrote: My MySQL is of version 5.5.8-log. I find I cannot save a query with INTERVAL in a view: redundant round brackets are added. If the query is SELECT INTERVAL(1, 2, 3, 4) within the frm file there is the expression interval((1, 2, 3, 4)) which is

function INTERVAL in view

2012-09-17 Thread hsv
My MySQL is of version 5.5.8-log. I find I cannot save a query with INTERVAL in a view: redundant round brackets are added. If the query is SELECT INTERVAL(1, 2, 3, 4) within the frm file there is the expression interval((1, 2, 3, 4)) which is wrong. What is known about this? -- MySQL

RE: Create a VIEW with nested SQL

2012-09-10 Thread hsv
2012/09/10 15:49 -0700, Rick James SELECT ... ORDER BY .. GROUP BY.. is syntactically incorrect. Yeap, my mistake. ( SELECT ... ORDER BY .. ) GROUP BY .. Is what I call the "group by trick". It is an optimal way to SELECT all the fields corresponding to the MAX (or M

RE: Create a VIEW with nested SQL

2012-09-10 Thread Rick James
wing it up. MariaDB decides that this construct can be optimized, and messes up the 'trick'. > -Original Message- > From: Mark Haney [mailto:ma...@abemblem.com] > Sent: Friday, September 07, 2012 6:12 AM > To: mysql@lists.mysql.com > Subject: Re: Create a VIEW wi

Re: Create a VIEW with nested SQL

2012-09-07 Thread hsv
ch_id) As for performance, maybe the suggested index helps (almost every table is owed a primary key), or maybe to reverse the three tables (call "ll" a virtual table). If you really want to make a view out of it, under MySQL it can be only two views, not one. (I extensivly use vie

RE: Create a VIEW with nested SQL

2012-09-07 Thread Rick James
[mailto:ma...@abemblem.com] > Sent: Thursday, September 06, 2012 5:51 AM > To: mysql@lists.mysql.com > Subject: Create a VIEW with nested SQL > > I have a bit of a performance/best practice question for those in the > know. I have a nested SQL statement that selects fields from a SELECT &g

Re: Create a VIEW with nested SQL

2012-09-07 Thread Mark Haney
und that GROUP BY not always orders the output, when everything is unique. And yes, MySQL balks at saving a view with a query for a table. One has to make them separate views. The problem I encountered is that I can't find a way to just pull the most recent records for each machine w

Re: Create a VIEW with nested SQL

2012-09-07 Thread Mark Haney
es--I have found that GROUP BY not always orders the output, when everything is unique. And yes, MySQL balks at saving a view with a query for a table. One has to make them separate views. Now that's a syntax I've never seen before. Then again, I haven't done any serious SQL i

Re: Create a VIEW with nested SQL

2012-09-06 Thread hsv
ur more times in "lights" or "machine"? If only once in both tables, GROUP BY at most orders it. It is not clear that ORDER BY does anything with GROUP BY outside it, unless "mach_id" is unique in both tables--I have found that GROUP BY not always orders the output,

Create a VIEW with nested SQL

2012-09-06 Thread Mark Haney
g it to pull data from the DB (read only) every 5 seconds or so to display status lights from machines. My thought was to make this a VIEW to see if that made a difference in speed, but when I went to create it mySQL choked with an error about the VIEW being built from a SELECT inside the SELECT.

Re: view query is slow

2012-08-23 Thread James W. McNeely
I think I'll just make a nightly process run that drops and then recreates the table, unless someone has a workable idea of how to make this view query-able. Thanks! Jim McNeely On Aug 23, 2012, at 2:06 PM, James W. McNeely wrote: > This didn't help, but good try! > > J

Re: view query is slow

2012-08-23 Thread James W. McNeely
t; est interdite. Ce message sert à l'information seulement et n'aura pas > n'importe quel effet légalement obligatoire. Étant donné que les email > peuvent facilement être sujets à la manipulation, nous ne pouvons accepter > aucune responsabilité pour le contenu fourni. &g

Re: view query is slow

2012-08-23 Thread James W. McNeely
Thanks for the responses to everyone! Here is the result for the explains. view query= explain select * from admin_exam_view where dateexam = '2012-

Re: view query is slow

2012-08-23 Thread Sergei Petrunia
On Thu, Aug 23, 2012 at 11:30:17AM -0700, James W. McNeely wrote: > I am working on a view based on this query: > > === > SELECT > -- Patient Info > p.IdPatient, > p.IdLastword MRN, > p.NameLast, > p.NameFirst, > p.Ad

RE: view query is slow

2012-08-23 Thread Rick James
nd without VIEW) We might have more comments/suggestions. > -Original Message- > From: James W. McNeely [mailto:j...@newcenturydata.com] > Sent: Thursday, August 23, 2012 11:30 AM > To: mysql@lists.mysql.com > Subject: view query is slow > > I am workin

Re: view query is slow

2012-08-23 Thread Shawn Green
On 8/23/2012 2:30 PM, James W. McNeely wrote: I am working on a view based on this query: === SELECT -- Patient Info p.IdPatient, p.IdLastword MRN, p.NameLast, p.NameFirst, p.Addr1, p.Addr2, p.AddrCity, p.AddrState, p.AddrZip, p.Gender, p.DateOfBirth

RE: view query is slow

2012-08-23 Thread Martin Gainty
à la manipulation, nous ne pouvons accepter aucune responsabilité pour le contenu fourni. > From: j...@newcenturydata.com > Subject: view query is slow > Date: Thu, 23 Aug 2012 11:30:17 -0700 > To: mysql@lists.mysql.com > > I am working on a view based on this query: > > ==

view query is slow

2012-08-23 Thread James W. McNeely
I am working on a view based on this query: === SELECT -- Patient Info p.IdPatient, p.IdLastword MRN, p.NameLast, p.NameFirst, p.Addr1, p.Addr2, p.AddrCity, p.AddrState, p.AddrZip, p.Gender, p.DateOfBirth, -- Provider Info af.IdAffil, af.PractName

CREATE VIEW COMMENT ''

2012-06-21 Thread hsv
To endow CREATE VIEW with COMMENT would be splendid. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql

Re: ERROR 1250 (42000): rejected view

2011-10-27 Thread Hal�sz S�ndor
;>>> 2011/10/20 10:21 -0400, Shawn Green (MySQL) >>>> On 10/19/2011 17:50, wrote: >I made this query a view, called "MEMBERP", no problem: ...snip... >Only "GivenName" is derived from "GROUP_CONCAT" and is also a lesser field for >

Re: ERROR 1250 (42000): rejected view

2011-10-20 Thread Shawn Green (MySQL)
Hello Hal�sz S�ndor, On 10/19/2011 17:50, wrote: I made this query a view, called "MEMBERP", no problem: SELECT MemberID, ereStart, DateModified, MembershipExpires, MemberSince, Category, Boardster, GROUP_CONCAT(DISTINCT Salutation ORDER BY Rank) AS Salutation, GROUP_CONCA

ERROR 1250 (42000): rejected view

2011-10-19 Thread Hal�sz S�ndor
I made this query a view, called "MEMBERP", no problem: SELECT MemberID, ereStart, DateModified, MembershipExpires, MemberSince, Category, Boardster, GROUP_CONCAT(DISTINCT Salutation ORDER BY Rank) AS Salutation, GROUP_CONCAT(DISTINCT GivenName ORDER BY Rank) AS GivenName, GR

Query Browser - Hiding View definition

2011-08-24 Thread Vikram A
Hi,  Is it possible to hide the VIEW definitions from query browser ? Or any other solution to hide the views ? Because I have used views for report purpose; where I have used AES_DECRIPT() function or decipher. When view is visible, this function and KEY also visible. I want to disable this

Re: How to view Query Execution time

2011-08-01 Thread Jon Siebert
you much more details. > http://dev.mysql.com/doc/refman/5.5/en/execution-plan-information.html > > http://www.techiequest.com/mysql-visual-explain-hierarchical-view-of-query-execution-plan/ > > On Sun, Jul 31, 2011 at 11:45 PM, Suresh Kuna >wrote: > > > Usually, at t

Re: How to view Query Execution time

2011-08-01 Thread Prabhat Kumar
you can also use EXPLAIN, which will give you much more details. http://dev.mysql.com/doc/refman/5.5/en/execution-plan-information.html http://www.techiequest.com/mysql-visual-explain-hierarchical-view-of-query-execution-plan/ On Sun, Jul 31, 2011 at 11:45 PM, Suresh Kuna wrote: > Usually,

Re: How to view Query Execution time

2011-07-31 Thread Suresh Kuna
Usually, at the end of the query running it displays the time how much it took. Or else enable the profiling and run the query to check the exact time it took for execution at all levels. On Mon, Aug 1, 2011 at 12:11 PM, Adarsh Sharma wrote: > Dear all, > > I want to know how much time did it ta

How to view Query Execution time

2011-07-31 Thread Adarsh Sharma
Dear all, I want to know how much time did it take to run a sample query. In postgresql, we enable timing by \timing command. Is there is any way to enable in Mysql Thanks -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/my

Re: WHERE does not work on calculated view field - Found word(s) list error in the Text body

2011-04-26 Thread Daniel Kraft
On 04/26/11 05:32, Halász Sándor wrote: 2011/04/25 18:45 +, Larry McGhaw>>>> CREATE VIEW `myview2` AS SELECT a.*, IF(b.`Name` IS NULL, '', b.`Name`) AS `TypeName` FROM `mytable` a LEFT JOIN `types` b ON a.`Type` = b.`ID`; <<<<

RE: WHERE does not work on calculated view field - Found word(s) list error in the Text body

2011-04-26 Thread Hal�sz S�ndor
>>>> 2011/04/25 18:45 +, Larry McGhaw >>>> CREATE VIEW `myview2` AS SELECT a.*, IF(b.`Name` IS NULL, '', b.`Name`) AS `TypeName` FROM `mytable` a LEFT JOIN `types` b ON a.`Type` = b.`ID`; <<<<<<<< Well, for th

Re: WHERE does not work on calculated view field - Found word(s) list error in the Text body

2011-04-25 Thread Daniel Kraft
Hi, On 04/25/11 20:45, Larry McGhaw wrote: My best advice is to not use a custom MySQL function in a view when the parameter to that function is a column or expression that has the potential to result in NULL because of being on the right side of a left outer join (or the left side of a right

RE: WHERE does not work on calculated view field - Found word(s) list error in the Text body

2011-04-25 Thread Larry McGhaw
Hello Daniel, My best advice is to not use a custom MySQL function in a view when the parameter to that function is a column or expression that has the potential to result in NULL because of being on the right side of a left outer join (or the left side of a right outer join). This

Re: WHERE does not work on calculated view field - Found word(s) list error in the Text body

2011-04-24 Thread Daniel Kraft
essage- From: Daniel Kraft [mailto:d...@domob.eu] Sent: Friday, April 22, 2011 1:05 PM To: Daevid Vincent Cc: mysql@lists.mysql.com Subject: Re: WHERE does not work on calculated view field - Found word(s) list error in the Text body Hi, thanks for the fast reply! On 04/22/11 21:39, Daevid V

Re: WHERE does not work on calculated view field

2011-04-23 Thread Daniel Kraft
Hi, thanks for the answer! On 04/23/11 11:33, ars k wrote: Could you check the 'myview' once again? I think you thought to create the view as follows: " CREATE VIEW `myview2` AS SELECT a.*, EMPTY_STRING(b.`Name`) AS `TypeName`FROM `mytable` a LEFT JOIN `types` b ON

Re: WHERE does not work on calculated view field

2011-04-23 Thread ars k
Hi Daniel, Could you check the 'myview' once again? I think you thought to create the view as follows: " CREATE VIEW `myview2` AS SELECT a.*, EMPTY_STRING(b.`Name`) AS `TypeName`FROM `mytable` a LEFT JOIN `types` b ON *a.ID* *= b.`ID`*; " Now your select queries

Re: WHERE does not work on calculated view field - Found word(s) list error in the Text body

2011-04-22 Thread Carsten Pedersen
On 22.04.2011 22:41, Larry McGhaw wrote: It does appear to be some type of bug to me. I agree. I was thrown by Daniels "first and third" comment, which I guess should read "second and third" I reproduced the behavior in 5.1.53-community on Windows. / Carsten -- MySQL General Mailing List F

RE: WHERE does not work on calculated view field - Found word(s) list error in the Text body

2011-04-22 Thread Larry McGhaw
mysql@lists.mysql.com Subject: Re: WHERE does not work on calculated view field - Found word(s) list error in the Text body Hi, thanks for the fast reply! On 04/22/11 21:39, Daevid Vincent wrote: >> DROP DATABASE `test`; >> CREATE DATABASE `test`; >> USE `test`; >> >> CREATE

Re: WHERE does not work on calculated view field

2011-04-22 Thread Daniel Kraft
); CREATE TABLE `types` (`ID` SERIAL, `Name` TEXT NOT NULL, PRIMARY KEY (`ID`)); INSERT INTO `types` (`Name`) VALUES ('Type A'), ('Type B'); DELIMITER | CREATE FUNCTION `EMPTY_STRING` (value TEXT) RETURNS TEXT DETERMINISTIC BEGIN RETURN IF(value IS NULL, '', value); END| DE

Re: WHERE does not work on calculated view field

2011-04-22 Thread Carsten Pedersen
ING` (value TEXT) RETURNS TEXT DETERMINISTIC BEGIN RETURN IF(value IS NULL, '', value); END| DELIMITER ; CREATE VIEW `myview` AS SELECT a.*, EMPTY_STRING(b.`Name`) AS `TypeName` FROM `mytable` a LEFT JOIN `types` b ON a.`Type` = b.`ID`; SELECT COUNT(*) FROM `myview` WHERE `TypeName` IS N

Re: WHERE does not work on calculated view field

2011-04-22 Thread Daniel Kraft
`types` (`ID` SERIAL, `Name` TEXT NOT NULL, PRIMARY KEY (`ID`)); INSERT INTO `types` (`Name`) VALUES ('Type A'), ('Type B'); DELIMITER | CREATE FUNCTION `EMPTY_STRING` (value TEXT) RETURNS TEXT DETERMINISTIC BEGIN RETURN IF(value IS NULL, '', value);

RE: WHERE does not work on calculated view field

2011-04-22 Thread Daevid Vincent
> -Original Message- > From: Daniel Kraft [mailto:d...@domob.eu] > Sent: Friday, April 22, 2011 12:37 PM > To: mysql@lists.mysql.com > Subject: WHERE does not work on calculated view field > > Hi all, > > I'm by no means a (My)SQL expert and just gett

WHERE does not work on calculated view field

2011-04-22 Thread Daniel Kraft
T DETERMINISTIC BEGIN RETURN IF(value IS NULL, '', value); END| DELIMITER ; CREATE VIEW `myview` AS SELECT a.*, EMPTY_STRING(b.`Name`) AS `TypeName` FROM `mytable` a LEFT JOIN `types` b ON a.`Type` = b.`ID`; SELECT COUNT(*) FROM `myview` WHERE `TypeName` IS NULL; SELECT CO

Re: temp table and view/function/procedure dilemma

2011-04-07 Thread Bgs
eries - mysql views cannot work from temporary tables so I have to drop a view+select/where approach. - functions cannot return result sets - procedures can do everything but I found no way to handle the result set within mysql (officially not supported) Any ideas how to solve this? Thanks in advanc

Re: temp table and view/function/procedure dilemma

2011-04-07 Thread Bgs
: - temporary table to work from - result sets derived from parametric queries - mysql views cannot work from temporary tables so I have to drop a view+select/where approach. - functions cannot return result sets - procedures can do everything but I found no way to handle the result set

Re: temp table and view/function/procedure dilemma

2011-04-06 Thread petya
table to work from - result sets derived from parametric queries - mysql views cannot work from temporary tables so I have to drop a view+select/where approach. - functions cannot return result sets - procedures can do everything but I found no way to handle the result set within mysql (officially not

Re: temp table and view/function/procedure dilemma

2011-04-06 Thread S�ndor Hal�sz
tial setup and needs are: - temporary table to work from - result sets derived from parametric queries - mysql views cannot work from temporary tables so I have to drop a view+select/where approach. - functions cannot return result sets - procedures can do everything but I found no way to handle the

temp table and view/function/procedure dilemma

2011-04-05 Thread Bgs
initial setup and needs are: - temporary table to work from - result sets derived from parametric queries - mysql views cannot work from temporary tables so I have to drop a view+select/where approach. - functions cannot return result sets - procedures can do everything but I found no way to

Updatable View limited by current user

2010-08-17 Thread Gregory Jefferis
Hello, I would like to have an updatable view that only shows the records in a table that have been created by the current user. By restricting regular users to this view (rather than the underlying table) they could only look at and modify their own data; more privileged users could look at

Re: How to View MySQL Temp Files and Temp Tables in Linux

2010-04-08 Thread Johan De Meersman
On Wed, Apr 7, 2010 at 11:45 PM, shamu...@gmail.com wrote: > Below is my MySQL Server's status and configuration. But I can not see > anything under /tmpfs/, it is showing empty to me. > > here is the result of "ls -al" > > drwxrwxrwx 2 mysql mysql60 Apr 7 17:43 tmpfs > Could anyone tell me

How to View MySQL Temp Files and Temp Tables in Linux

2010-04-07 Thread shamu...@gmail.com
Below is my MySQL Server's status and configuration. But I can not see anything under /tmpfs/, it is showing empty to me. here is the result of "ls -al" drwxrwxrwx 2 mysql mysql60 Apr 7 17:43 tmpfs Could anyone tell me how to check the status of temp files and temp tables on disk? Thanks.

Re: how to view all acounts in a database

2010-02-05 Thread John Meyer
On 2/5/2010 5:15 AM, Suresh Kuna wrote: In the mysql prompt, execute the below use mysql ; select user from user ; will show all the accounts in a MySQL database. Alternatively, you can use myphpadmin. I guess it all depends upon what you need the information for and to what purpose. --

Re: how to view all acounts in a database

2010-02-05 Thread Евгений Килимчук
Hi! Use mysql client: mysql> *SELECT `user`, `host` FROM `mysql`.`user` LIMIT 0, 5;* 2010/2/5 ishaq gbola : > Hi Guys, > > Which command can allow me view all accounts in a Mysql database > > > > -- Best regards, Eugene Kilimchuk

Re: how to view all acounts in a database

2010-02-05 Thread RaMeSh
Login to mysql with the command mysql -uroot -px -A use the database mysql mysql> \u mysql View the table name user mysql> show tables; To view the user mysql> select user from user; On 5 February 2010 17:45, Suresh Kuna wrote: > In the mysql prompt, execute the below &

Re: how to view all acounts in a database

2010-02-05 Thread Suresh Kuna
In the mysql prompt, execute the below use mysql ; select user from user ; will show all the accounts in a MySQL database. On Fri, Feb 5, 2010 at 5:27 PM, ishaq gbola wrote: > Hi Guys, > > Which command can allow me view all accounts in a Mysql database > > > > -

how to view all acounts in a database

2010-02-05 Thread ishaq gbola
Hi Guys, Which command can allow me view all accounts in a Mysql database

Re: converting non-materialized view to a table?

2010-01-14 Thread mos
At 04:55 PM 1/14/2010, Jacek Becla wrote: Hello, I need to convert a non-materialized MySQL view to a MySQL table. Are there any tools to do that? Thanks, Jacek Jacek, Can't you just do a: create table mytable select * from myview; ??? Mike -- MySQL General Mailing List For

converting non-materialized view to a table?

2010-01-14 Thread Jacek Becla
Hello, I need to convert a non-materialized MySQL view to a MySQL table. Are there any tools to do that? Thanks, Jacek -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org

RE: Is a view efficient in joins?

2009-11-29 Thread Neil Aggarwal
Jim: > A view is no more or less efficient that the queries that > make it up. Each > time you invoke the view, you repeat all the joins. That is what I was afraid of. With the large number of tables I have, the joins are going to take a lot of cycles to run. > Your solution of

Re: Is a view efficient in joins?

2009-11-29 Thread Jim Lyons
A view is no more or less efficient that the queries that make it up. Each time you invoke the view, you repeat all the joins. A join could be more efficient only if you go to a lot of effort to ensure it forms the most efficient join(s) of the underlying tables. Your solution of the summary

Is a view efficient in joins?

2009-11-29 Thread Neil Aggarwal
Hello: I have a database with over 60 tables with thousands to millions or rows in each. I want to develop a summary of the data joined across all the tables. I can do this with a view, but I am concerned it will take a lot of resources to perform all the joins required by the view. Is a view

Re: slow select when using VIEW

2009-06-10 Thread Dan Nelson
In the last episode (Jun 10), Yariv Omer said: > I have created the following 2 views: > CREATE VIEW `cpes_noise_num` AS [ big view] > > CREATE VIEW `my_connect` AS [ big view joining on cpes_noise_num ] > > when I am trying to do something like: > SELECT count(*) from my_

slow select when using VIEW

2009-06-10 Thread Yariv Omer
Hi I have created the following 2 views: CREATE VIEW `cpes_noise_num` AS SELECT cpes_dsl_line_stats.id_cpes, sum(IF(cpes_dsl_line_stats.snr_downstream < (SELECT snr_downstream FROM admin_configs WHERE admin_id =0),1,0)) AS snr_downstream, sum(IF((cpes_dsl_line_stats.bit_err

Can I force a View to use a particular index when the view is executed in a Select?

2009-03-12 Thread mos
I have a view which is a 3 table join on a compound index. I have two indexes: Index1: Product_Code, Store_Id, Date_Sold and Index2: Date_Sold,Store_Id,Product_Code If I execute a select like: select * from MyView where product_code="123";

View creator host updates

2009-03-06 Thread Chance Yeoman
Hello, After a system host name had changed, my organization updated the MySQL user records, changing the old (and now non-existent) host name to the new one. This caused any views that were created by users accessing the MtSQL server from the old host to become invalid as the view's creating

Re: view doesn't refresh inside transaction

2009-03-05 Thread Baron Schwartz
Ingo, On Wed, Mar 4, 2009 at 8:49 AM, Ingo Weiss wrote: > Hi all, > > I have a view that is joining two base tables. I can update through > the view, but insert only through the base tables. Now I am having the > problem that seems to boil down to the following: When I insert

view doesn't refresh inside transaction

2009-03-04 Thread Ingo Weiss
Hi all, I have a view that is joining two base tables. I can update through the view, but insert only through the base tables. Now I am having the problem that seems to boil down to the following: When I insert into the base tables inside a transaction, the view doesn't seem to update.

Re: MySQL View

2009-02-10 Thread Jochem van Dieten
On Tue, Feb 10, 2009 at 1:47 PM, Steven Buehler wrote: > From: Jochem van Dieten: >> What the database will do for you behind the scenes is expand your >> usage of the view. In effect, the database will replace "x" with its >> definition. So your query SELECT a FROM

RE: MySQL View

2009-02-10 Thread Steven Buehler
> -Original Message- > From: Jochem van Dieten [mailto:joch...@gmail.com] > Sent: Tuesday, February 10, 2009 5:10 AM > To: mysql@lists.mysql.com > Subject: Re: MySQL View > > On Mon, Feb 9, 2009 at 3:41 PM, Steven Buehler wrote: > > Ok, I just saw a post abou

Re: MySQL View

2009-02-10 Thread Jochem van Dieten
On Mon, Feb 9, 2009 at 3:41 PM, Steven Buehler wrote: > Ok, I just saw a post about using view's in mysql. I tried to look it up > and found how to use it, but my question is: what is a view and why would > you use it? The problem with any definition of an object in a database is

RE: MySQL View

2009-02-09 Thread Steven Buehler
Steve From: Claudio Nanni [mailto:claudio.na...@gmail.com] Sent: Monday, February 09, 2009 3:59 PM To: Steven Buehler Cc: mysql@lists.mysql.com Subject: Re: MySQL View Steven, I would suggest you the reading of a basic book about SQL and Databases, I explain you why. Views are a very fundam

Re: MySQL View

2009-02-09 Thread Claudio Nanni
Steven, this is my humble opinion. Please let me know what you think Claudio 2009/2/9 Steven Buehler > I just found something else out and did a test. So a view is a table in a > database that can be shared. The example I found was if you have multiple > people that need a databas

Re: Updatable view using subquery??

2009-02-09 Thread Baron Schwartz
> Your subquery is not in the select list, it is in the where. A > subquery in the select list would be: > CREATE VIEW v_aa AS > SELECT > * > , (SELECT MAX(x) FROM y) AS z > FROM flight > > This is not updatable because there is no sensible way to propagate &g

RE: MySQL View

2009-02-09 Thread Steven Buehler
I just found something else out and did a test. So a view is a table in a database that can be shared. The example I found was if you have multiple people that need a database for something, but it still has to keep the information separate, instead of having multiple databases, you can create

RE: MySQL View

2009-02-09 Thread Martin Gainty
CC: mysql@lists.mysql.com > Subject: RE: MySQL View > Date: Mon, 9 Feb 2009 10:10:45 -0600 > > > > > -Original Message- > > From: baron.schwa...@gmail.com [mailto:baron.schwa...@gmail.com] On > > Behalf Of Baron Schwartz > > Sent: Monday, February 09, 2

Re: Updatable view using subquery??

2009-02-09 Thread Jochem van Dieten
On Mon, Feb 9, 2009 at 1:17 PM, wrote: > mysql> CREATE VIEW v_aa AS >-> SELECT * >-> FROM flight AS f >-> WHERE f.RouteID IN >-> (SELECT r.RouteID >-> FROM route AS r >-> WHERE r.To= >-> (SE

RE: MySQL View

2009-02-09 Thread Steven Buehler
> -Original Message- > From: baron.schwa...@gmail.com [mailto:baron.schwa...@gmail.com] On > Behalf Of Baron Schwartz > Sent: Monday, February 09, 2009 9:19 AM > To: Steven Buehler > Cc: mysql@lists.mysql.com > Subject: Re: MySQL View > > On Mon, Feb 9, 2009

Re: MySQL View

2009-02-09 Thread Baron Schwartz
On Mon, Feb 9, 2009 at 9:41 AM, Steven Buehler wrote: > Ok, I just saw a post about using view's in mysql. I tried to look it up > and found how to use it, but my question is: what is a view and why would > you use it? Is it like a temporary table? Does it write a new database to

MySQL View

2009-02-09 Thread Steven Buehler
Ok, I just saw a post about using view's in mysql. I tried to look it up and found how to use it, but my question is: what is a view and why would you use it? Is it like a temporary table? Does it write a new database to the disk or use memory? Thanks Steve

Re: Updatable view using subquery??

2009-02-09 Thread Baron Schwartz
Hi! On Mon, Feb 9, 2009 at 7:17 AM, wrote: > Hi > > I am able to create an updatable view using a subquery in MySQL 5.1.29 > > mysql> CREATE VIEW v_aa AS >-> SELECT * >-> FROM flight AS f >-> WHERE f.RouteID IN >-> (SE

Updatable view using subquery??

2009-02-09 Thread blue . trapezius
Hi I am able to create an updatable view using a subquery in MySQL 5.1.29 mysql> CREATE VIEW v_aa AS -> SELECT * -> FROM flight AS f -> WHERE f.RouteID IN -> (SELECT r.RouteID -> FROM route AS r -> WHERE r.To= ->

RE: is INSERT into VIEW supported

2008-11-13 Thread Martin Gainty
generally no as join conditions do not guarantee 1)the column to be inserted is unique 2)the column is updatable //Create a View based on 2 tables joined on location+id CREATE VIEW locations_view AS SELECT d.department_id, d.department_name, l.location_id, l.city FROM departments d

is INSERT into VIEW supported

2008-11-13 Thread dzenan . causevic
I have a VIEW that is defined over two base tables. One table is subtype of another table and it's the VIEW that connects them. Now when I want to insert into a subtable I have to insert through the VIEW. However I am getting an error message when I try to insert into a VIEW. I found the sol

Re: Insert static column into VIEW

2008-10-14 Thread Martijn Tonies
> Hey guys, > > I am trying to construct a specially crafted view for the powerdns > DNS-Server. > This is what I have so far: > CREATE VIEW test4 AS SELECT nummer AS name, ip as content FROM > jabix.spaces JOIN jabix.ves ON spaces.veid = ves.id; Wouldn't this work

Re: Insert static column into VIEW

2008-10-14 Thread Olaf Stein
You can add a column to a view like this: CREATE VIEW test4 AS SELECT nummer AS name, ip as content, 1 as domain_id FROM jabix.spaces JOIN jabix.ves ON spaces.veid = ves.id; This will set the domain_id vaulues to 1 Olaf On 10/14/08 8:18 AM, "Samuel Vogel" <[EMAIL PROTECTED]> wr

Re: Insert static column into VIEW

2008-10-14 Thread Samuel Vogel
This is exactly what I tried to avoid by using a view. I do not want to have to take care about synchronizing two tables. Is there any way to avoid this? Regards, Samy

Re: Insert static column into VIEW

2008-10-14 Thread Ananda Kumar
Hi Samuel, I am not sure if you can add a new column to a view, but why dont u create a new table test4 as create table test4 AS SELECT nummer AS name, ip as content FROM jabix.spaces JOIN jabix.ves ON spaces.veid = ves.id; And then add the new column to test4. When ever any new data is added

Insert static column into VIEW

2008-10-14 Thread Samuel Vogel
Hey guys, I am trying to construct a specially crafted view for the powerdns DNS-Server. This is what I have so far: CREATE VIEW test4 AS SELECT nummer AS name, ip as content FROM jabix.spaces JOIN jabix.ves ON spaces.veid = ves.id; ++---+ | name | content

Re: use of wildcards or regular expressions in IFNULL, how to create a view that substitutes NULL by 0?

2008-09-06 Thread Brent Baisley
lumns should probably be records with a column indicating what type of data it is. Brent Baisley On Sep 4, 2008, at 5:11 AM, drflxms wrote: Dear MySQL specialists, this is a MySQL-newbie question: I want to create a view of a table, where all NULL-values are substituted by 0. Therefore I

use of wildcards or regular expressions in IFNULL, how to create a view that substitutes NULL by 0?

2008-09-04 Thread drflxms
Dear MySQL specialists, this is a MySQL-newbie question: I want to create a view of a table, where all NULL-values are substituted by 0. Therefore I tried: SELECT *, IFNULL(*,0) FROM table Unfortunately IFNULL seems not to accept any wildcards like * as placeholder for the column-name. REGEXP

Bug?: mysqldump for view definitions

2008-07-29 Thread Dominik Klein
Hi I have a testview defined as mysql> create table testview (a int); Query OK, 0 rows affected (0.01 sec) mysql> create view view_of_testview as (select * from testview); Query OK, 0 rows affected (0.00 sec) I create a dump of this view definition with mysqldump --tab=/tm

Re: create view not working

2008-06-18 Thread Martijn Tonies
Aaron, > why doesn't this work? the select works perfectly Define "doesn't work"? What is the error message? > create view cost_report as > SELECT c_name, d_manuf as Manufacturer, d_model as Model, count(1) as > "Number Enrolled", > d_price as "

create view not working

2008-06-17 Thread Aaron Ryden
why doesn't this work? the select works perfectly create view cost_report as SELECT c_name, d_manuf as Manufacturer, d_model as Model, count(1) as "Number Enrolled", d_price as "Monthly Price", count(1)*d_price as "Cost" FROM `b_devices` A left join b_dev

Lands with sea view and prived beaches for sale. It worth try to see it. TY!

2008-06-12 Thread Estevao Gomes
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";> http://www.w3.org/1999/xhtml";> newsletter arpsworldproperties Our contacts: tel: + 44 (0)208 200 60 20 | fax: + 44 (0)208 200 10 49 | m: + 44 (0)7938 056 756 email: mailto:[EMAIL PROTECTED]" class

Lands with sea view and beaches for sale, it worth try to see. Thank You!

2008-06-12 Thread Estevao Gomes
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";> http://www.w3.org/1999/xhtml";> newsletter arpsworldproperties Our contacts: tel: + 44 (0)208 200 60 20 | fax: + 44 (0)208 200 10 49 | m: + 44 (0)7938 056 756 email: mailto:[EMAIL PROTECTED]" class

  1   2   3   4   >