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! > > Jim McNeely > > On Au

Re: view query is slow

2012-08-23 Thread James W. McNeely
This didn't help, but good try! Jim McNeely On Aug 23, 2012, at 12:27 PM, Martin Gainty wrote: > > If memory serves predicates convert strings to column-data-type (in your case > DATE) this *should* help > WHERE dateexam = STR_TO_DATE('2012-08-13','%Y-%m-%d') > does this help? > Martin > ___

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-08-13'; ++-+---+--+-++-+++

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.Addr1, > p.Addr2, > p.AddrCity, > p.AddrS

RE: view query is slow

2012-08-23 Thread Rick James
That is an example of where VIEWs screw up optimizations. Rumor has it that 5.6.6 might have improvements. Probably inefficient: ON CONCAT(e.IdAppt , '0') = c.IdApptType p might benefit from INDEX(AddrState, DateOfBirth) SHOW CREATE TABLE (for each table) EXPLAIN SELECT (with and without VIE

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, -- Provi

RE: view query is slow

2012-08-23 Thread Martin Gainty
If memory serves predicates convert strings to column-data-type (in your case DATE) this *should* help WHERE dateexam = STR_TO_DATE('2012-08-13','%Y-%m-%d') does this help? Martin __ Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentia

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 into > the base tabl

Re: view irregularities

2008-02-14 Thread Lev Lvovsky
Shawn, On Feb 13, 2008, at 9:12 AM, Shawn Green wrote: Lev Lvovsky wrote: I'm running into a difficult to reproduce problem with a view which is similar to the following: CREATE TABLE Common ( COMMON_ID INT UNSIGNED AUTO_INCREMENT PRIMARY KEY, COMMON_NAME VARCHAR(50), UNIQU

Re: view irregularities

2008-02-13 Thread Shawn Green
Lev Lvovsky wrote: I'm running into a difficult to reproduce problem with a view which is similar to the following: CREATE TABLE Common ( COMMON_ID INT UNSIGNED AUTO_INCREMENT PRIMARY KEY, COMMON_NAME VARCHAR(50), UNIQUE(COMMON_NAME) ) ENGINE = InnoDB; CREATE TABLE Parent

Re: VIEW and ROW_NUMBER

2008-01-04 Thread Moon's Father
I always use stored procedure when I meet such demand. On Jan 3, 2008 11:09 PM, Baron Schwartz <[EMAIL PROTECTED]> wrote: > Hi, > > On Jan 3, 2008 9:28 AM, GF <[EMAIL PROTECTED]> wrote: > > I need to create a view, about a ranking. > > The select from which I generate the view has a "ORDER BY" a

Re: VIEW and ROW_NUMBER

2008-01-03 Thread Baron Schwartz
Hi, On Jan 3, 2008 9:28 AM, GF <[EMAIL PROTECTED]> wrote: > I need to create a view, about a ranking. > The select from which I generate the view has a "ORDER BY" and I need > to have a column in that select that shows the position of the object > in that ranking. > > I have searched on google, an

Re: View pocedures/backup procedures

2007-07-10 Thread Dan Nelson
In the last episode (Jul 10), Andrey Dmitriev said: > How do I view and backup my procedural code? > > In oracle it would be something like > Select text from user_source where name='MY_PROCEDURE' order by line; > > I did mysqldump, and didn't see any of the functions or procedures > created. >

Re: View select results

2007-05-02 Thread Peter Brawley
>One last thing: you set, at first, a parameter called @prev with Null >(' ') value: right? No, I set it to a string containing one space char. Use anything that does not occur as data in the column. >And, after, you use, instead IF ELSE statement, another syntax: is it >trinary operator? if y

Re: View select results

2007-05-02 Thread spacemarc
2007/5/2, Peter Brawley <[EMAIL PROTECTED]>: Right, give the computed column an alias differeing from the column name, eg SET @prev=''; SELECT IF(area = @prev, '', @prev := area) AS AreaHdr, text,amount FROM products ORDER BY area DESC; ok, now it works! thanks! One last thing: you set, a

Re: View select results

2007-05-02 Thread Peter Brawley
Right, give the computed column an alias differeing from the column name, eg SET @prev=''; SELECT IF(area = @prev, '', @prev := area) AS AreaHdr, text,amount FROM products ORDER BY area DESC; PB spacemarc wrote: 2007/5/2, Peter Brawley <[EMAIL PROTECTED]>: Works for me. Please post a CREA

Re: View select results

2007-05-02 Thread spacemarc
2007/5/2, Peter Brawley <[EMAIL PROTECTED]>: Works for me. Please post a CREATE TABLE stmt & enough INSERTs to demonstrate the problem. This is the dump (MySQL: 5.0.38): the table is not final version, just to test the query. CREATE TABLE `products` ( `area` varchar(25) NOT NULL, `text` varcha

Re: View select results

2007-05-02 Thread Peter Brawley
>can I obtain a recordset like this? >area1, value_one, thing_one > //, value_two, thing_32 > //, value_three, thing_ dd >area2, value_ten, thing_6w > //, value_ff, thing_l SET @prev=''; SELECT IF(area = @prev, '', @prev := area) AS area, ... other columns ... FROM &c ... PB spacema

Re: View select results

2007-05-02 Thread Baron Schwartz
Hi, spacemarc wrote: Hi my table have three fields that, if selected, are shown like: area1, value_one, thing_one area1, value_two, thing_32 area1, value_three, thing_ dd area2, value_ten, thing_6w area2, value_ff, thing_l can I obtain a recordset like this? area1, value_one, thing_

RE: View with Subselect for User ID

2007-04-24 Thread Andreas Iwanowski
7;@',1) using latin1))); --- -Original Message- From: Martijn Tonies [mailto:[EMAIL PROTECTED] Sent: Tuesday, April 24, 2007 12:09 PM To: Andreas Iwanowski Cc: mysql@lists.mysql.com Subject: Re: View with Subselect for User ID Hello Andreas, >I tried the following stat

Re: View with Subselect for User ID

2007-04-24 Thread Martijn Tonies
Hello Andreas, >I tried the following statement: > >CREATE OR REPLACE ALGORITHM=UNDEFINED [EMAIL PROTECTED] SQL >SECURITY DEFINER VIEW `shared_v` AS SELECT `shared`.`ID` AS >`ID`,`shared`.`RawID` AS `RawID`,`shared`.`OwnerID` AS >`OwnerID`,`shared`.`UserID` AS `UserID`,`shared`.`GroupI

RE: View with Subselect for User ID

2007-04-24 Thread Andreas Iwanowski
Hello Christian, Thank you very much for this reply. It was very helpful, and the user matching part works as it should. Is there any way to JOIN on two tables, so I can match the Users.GroupID field against a JOIN on Groups.ID? Also, I tried adding a WHERE clause after the join to compare Users.

Re: View with Subselect for User ID

2007-04-24 Thread Christian High
On 4/23/07, Andreas Iwanowski <[EMAIL PROTECTED]> wrote: Hello MySQL experts, I am trying to create a view whose access is based on a User ID that need to be looked up in a different table. Here is an example of what I'm trying to do: CREATE OR REPLACE ALGORITHM=UNDEFINED [EMAIL PROTECTED] SQL

RE: View hidden temporary files

2006-09-08 Thread informatica
Thanks. That works for me. -Mensaje original- De: Dan Nelson [mailto:[EMAIL PROTECTED] Enviado el: jueves, 07 de septiembre de 2006 19:05 Para: [EMAIL PROTECTED] CC: MySql Mail List Asunto: Re: View hidden temporary files In the last episode (Sep 07), [EMAIL PROTECTED] said: > In h

Re: View hidden temporary files

2006-09-07 Thread Visolve DB Team
Hi, MySQL creates temporary table to complete the query. However, it doesn't tell you whether that temporary table will be in memory or on disk. MySQL's tmp_table_size variable will control the temporary table size.The default tmp_table_size size is 32 MB Temporary tables can either be in th

Re: View hidden temporary files

2006-09-07 Thread Dan Nelson
In the last episode (Sep 07), [EMAIL PROTECTED] said: > In http://dev.mysql.com/doc/refman/4.1/en/temporary-files.html says > > "MySQL creates all temporary files as hidden files. This ensures that > the temporary files are removed if mysqld is terminated. The > disadvantage of using hidden files

Re: VIEW not working with myODBC in XP and Access 2003

2006-05-12 Thread sheeri kritzer
This is an Access problem; you'll need to find folks who know access to fix it. Try: http://www.tek-tips.com/viewthread.cfm?qid=1146857&page=1 ?? -Sheeri On 4/26/06, Daevid Vincent <[EMAIL PROTECTED]> wrote: I have a critical problem that I hope there is a simple solution for. I've just spen

Re: View onto tables w/ identical key names

2005-07-01 Thread Martijn Tonies
> >When creating the view, use > >CREATE VIEW viewname ( column names ) > >AS > >select [fields] > > > >Instead of "*". This way, you can only return a single "mat" column instead > >of having that column twice in the view. > > > > > i'll try that programmatically, no way am i typing close to 100

Re: View onto tables w/ identical key names

2005-07-01 Thread Les Schaffer
Martijn Tonies wrote: When creating the view, use CREATE VIEW viewname ( column names ) AS select [fields] Instead of "*". This way, you can only return a single "mat" column instead of having that column twice in the view. i'll try that programmatically, no way am i typing close to 1000 fi

Re: View onto tables w/ identical key names

2005-07-01 Thread Martijn Tonies
Les, > i am working on a database system where a number of tables (5-10) each > with possibly hundreds of columns share an identical primary key name. > the truth is if it weren't for a limitation in the number of columns in > M$ Access (long story: we're creating a client server scheme so th

Re: View

2005-06-02 Thread Spenser
Views are supported, however, starting with MySQL version 5.0.1. See this page of the on-line documentation to read more about it: http://dev.mysql.com/doc/mysql/en/views.html On Thu, 2005-06-02 at 14:31 -0400, Jerry Swanson wrote: > Does Mysql 4 supports "views"? -- MySQL General Mailing Li

Re: View

2005-06-02 Thread mfatene
NO Selon Jerry Swanson <[EMAIL PROTECTED]>: > Does Mysql 4 supports "views"? > > -- > MySQL General Mailing List > For list archives: http://lists.mysql.com/mysql > To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED] > > -- MySQL General Mailing List For list archives: http://lists.my

Re: View

2005-06-02 Thread SGreen
Jerry Swanson <[EMAIL PROTECTED]> wrote on 06/02/2005 02:31:06 PM: > Does Mysql 4 supports "views"? > There were at least two other ways you could have found this information: RTFM: http://dev.mysql.com/doc/mysql/en/ansi-diff-views.html Search this list's archives: http://lists.mysql.com/mysql

RE: View

2005-06-02 Thread Bartis, Robert M (Bob)
I believe 5.0 does. -Original Message- From: Andreas Ahlenstorf [mailto:[EMAIL PROTECTED] Sent: Thursday, June 02, 2005 2:55 PM To: Jerry Swanson Cc: mysql@lists.mysql.com Subject: Re: View Am 02.06.2005 um 20:31 schrieb Jerry Swanson: > Does Mysql 4 supports "views"? No

Re: View

2005-06-02 Thread Andreas Ahlenstorf
Am 02.06.2005 um 20:31 schrieb Jerry Swanson: Does Mysql 4 supports "views"? No. Regards, A. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

Re: VIEW

2004-06-15 Thread Martijn Tonies
Hi Steven, > I've been looking at the post in the website, but cannot find a clear answehr > about views. > Once is stated that it will be available in 5.0, and once that it's allready > in 4.1. > In the 5.0 features list etc. nothing is mentioned. > I like to know: when and how (docs) can I use

Re: view warnings?

2003-12-10 Thread Egor Egorov
Bryan Harris <[EMAIL PROTECTED]> wrote: >>> I'm pretty new to MySQL, but I already like it. Kudos to the developers! >>> >>> I recently did a mysqlimport on a few data files, and it came back with over >>> 4000 warnings. How can I actually see what the warnings were? I'm still >>> not sure what

Re: view warnings?

2003-12-09 Thread Bryan Harris
>> I'm pretty new to MySQL, but I already like it. Kudos to the developers! >> >> I recently did a mysqlimport on a few data files, and it came back with over >> 4000 warnings. How can I actually see what the warnings were? I'm still >> not sure what it was upset about... > > You can't. > Fr

Re: view warnings?

2003-12-08 Thread Egor Egorov
Bryan Harris <[EMAIL PROTECTED]> wrote: > > I'm pretty new to MySQL, but I already like it. Kudos to the developers! > > I recently did a mysqlimport on a few data files, and it came back with over > 4000 warnings. How can I actually see what the warnings were? I'm still > not sure what it was

re: View Warnings

2003-02-26 Thread Victoria Reznichenko
On Wednesday 26 February 2003 02:40, Robert Mark Bram wrote: > mysql>LOAD DATA LOCAL > ->INFILE > "/Rob/architecturalScreens/prototype/v1/database/insertPart.dat" > ->INTO TABLE part; > Query OK, 496 rows affected (0.08 sec) > Records: 496 Deleted: 0 Skipped: 0 Warnings: 149

re: Re: view privileges

2003-01-16 Thread Egor Egorov
On Thursday 16 January 2003 09:15, Addison Ellis wrote: > how can i view privileges for a table in a db? There is no command to see privileges on the certain table/db etc. If you have privileges on database 'mysql' you can search through tables to see privileges. -- For technical s

Re: view privileges

2003-01-16 Thread Doug Thompson
SELECT * from mysql.tables_priv where Table_name = 'myTable'; You will probably have to log on as 'root' unless you have created another user with the same privileges. The mysql GRANTs system is used to control USER privileges. This means that for a given table you can view which users can perfor

Re: view privileges

2003-01-15 Thread Addison Ellis
hello, how can i view privileges for a table in a db? thank you, addison sql,query,queries,smallint -- Addison Ellis small independent publishing co. 114 B 29th Avenue North Nashville, TN 37203 (615) 321-1791 [EMAIL PROTECTED] [EMAIL PROTECTED] subsidiaries of small independent publishing co. [EMA

Re: View image from browser

2002-12-27 Thread Michael She
What language are you using to pull the data? ASP? PHP? VB? At 11:23 PM 12/26/2002 -0800, tan tan wrote: Hi, Is anyone know how to view image that is stored in mysql as binary format to a browser ? Thank you. -- Michael She : [EMAIL PROTECTED] Mobile : (519) 589-7309 WWW Homepage :

Re: View image from browser

2002-12-27 Thread tan tan
Hi, Sorry I didn't check in the pdf. Thanks guys. By the way, I found there is an article from www.onlamp.com/lpt/a/a370 it uses the php to do the same thing. Thanks once again. Tan Tan --- Paul DuBois <[EMAIL PROTECTED]> wrote: > At 0:43 -0800 12/27/02, tan tan wrote: > >Hi Paul > >I went to the

Re: View image from browser

2002-12-27 Thread Doug Thompson
On Fri, 27 Dec 2002 07:15:01 -0600, Paul DuBois wrote: >At 0:43 -0800 12/27/02, tan tan wrote: >>Hi Paul >>I went to the site and I can't look for the page. >>If you dont' mind to get the the exact url. >>Thanks. > >Odd. Anyone else out there have trouble with that URL? > >http://www.kitebird.com

Re: View image from browser

2002-12-27 Thread Paul DuBois
At 0:43 -0800 12/27/02, tan tan wrote: Hi Paul I went to the site and I can't look for the page. If you dont' mind to get the the exact url. Thanks. Odd. Anyone else out there have trouble with that URL? http://www.kitebird.com/mysql-perl/downloads.php http://www.kitebird.com/mysql-perl/webdb/

Re: View image from browser

2002-12-27 Thread Solid Plasma (slpl)
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hello tan, Friday, December 27, 2002, 8:43:25 AM, you wrote: > Hi Paul > I went to the site and I can't look for the page. > If you dont' mind to get the the exact url. > Thanks. you don't find it because it's an pdf file http://www.kitebird.com/my

Re: View image from browser

2002-12-27 Thread tan tan
Hi Paul I went to the site and I can't look for the page. If you dont' mind to get the the exact url. Thanks. --- Paul DuBois <[EMAIL PROTECTED]> wrote: > At 23:23 -0800 12/26/02, tan tan wrote: > >Hi, > > > >Is anyone know how to view image that is stored in > >mysql as binary format to > >a brow

Re: View image from browser

2002-12-27 Thread Paul DuBois
At 23:23 -0800 12/26/02, tan tan wrote: Hi, Is anyone know how to view image that is stored in mysql as binary format to a browser ? Thank you. Once you pull your image data from MySQL (I assume you're using some kind of script for this), then you do this the same way you'd do it if MySQL were

RE: View current connections

2002-08-15 Thread William R. Mussatto
Is the MySQL serving a web site? If yes, wrap show processlist in perl or php and have it generate an auto refreshing page. On Thu, 15 Aug 2002, Tab Alleman wrote: > Date: Thu, 15 Aug 2002 11:01:44 -0400 > From: Tab Alleman <[EMAIL PROTECTED]> > To: [EMAIL PROTECTED] >

Re: View current connections

2002-08-15 Thread Mikhail Entaltsev
gards, Mikhail. - Original Message - From: "Tab Alleman" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, August 15, 2002 5:01 PM Subject: RE: View current connections Thanks for the reply Egor.. This helps, but what I'm really hoping to find is a GU

RE: View current connections

2002-08-15 Thread Tab Alleman
ugust 15, 2002 7:08 AM To: [EMAIL PROTECTED] Subject: Re: View current connections Tab, Wednesday, August 14, 2002, 11:06:36 PM, you wrote: TA> Is there a tool out there for Windows that will let me monitor how TA> many connections to my MySQL database are currently open at any TA> give

Re: View current connections

2002-08-15 Thread Egor Egorov
Tab, Wednesday, August 14, 2002, 11:06:36 PM, you wrote: TA> Is there a tool out there for Windows that will let me monitor how many TA> connections to my MySQL database are currently open at any given moment? Use SHOW PROCESSLIST command: http://www.mysql.com/doc/en/SHOW_PROCESSLIST.html

Re: view support

2001-09-19 Thread Jeremy Zawodny
On Wed, Sep 19, 2001 at 12:37:04PM -0400, Alexander Pichtchikov wrote: > Gents, > > When version 4.1 of MySQL with view supporting will publish? Sometime after 4.0. Seriously, though, I don't think anyone knows with much certainty. The 4.0 release has to hit alpha/beta/gamma testing and then be

Re: View a return of Select

2001-03-23 Thread Bob Hall
> I have to check to MySQL is able to support our requirements >and I would >like to view a return of n columns like only one register, thats is posible >with MySQL? > For example i have 2 tables , 1 table have products and this >table habe 3 >colums ID , name, Id_price and the other

RE: View a return of Select

2001-03-23 Thread Cal Evans
Not without some procedural code in a different language or creating temp tables. (Both are bad ideas.) Using straight SQL, the best you can get it 3 records, each with all the info from table 1 and a different row from table 2. HTH, Cal http://www.calevans.com -Original Message- From: