[Firebird-devel] Confusing message when security3 is not found
Hello, I know security3.fdb is not in place because I'm using the Debug dir: F:\fb3dev\fbbuild\firebird30\temp\Win32\Debug\firebird>isql -user sysdba -pass masterkey Use CONNECT or CREATE DATABASE to specify a database SQL> create database 'user.fdb'; SQL> create user secondary pass 'sec'; Statement failed, SQLSTATE = 42000 Dynamic SQL Error -SQL error code = -104 -Token unknown - line 1, column 23 -pass I thought we would allow PASS as a shortcut for PASSWORD. Anyway: SQL> create user secondary password 'sec'; Statement failed, SQLSTATE = 08001 unsuccessful metadata update -CREATE USER SECONDARY failed -I/O error during "CreateFile (open)" operation for file "F:\fb3dev\fbbuild\firebird30\temp\Win32\Debug\firebird\/security3.fdb" -Error while trying to open file -The system cannot find the file specified. SQL> The final part of the path is confusing for the user: firebird\/security3.fdb I don't know if firebird is really looking for temp/Win32/Debug/firebird//security3.fdb or only the message contains an extra directory separator. C. --- Claudio Valderrama C. Consultant, SW developer. -- Rapidly troubleshoot problems before they affect your business. Most IT organizations don't have a clear picture of how application performance affects their revenue. With AppDynamics, you get 100% visibility into your Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro! http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel
Re: [Firebird-devel] Some aspects of the optimizer hints
On 2-1-2014 19:37, Jim Starkey wrote: > I presume everyone knows about standard SQL "select ... OFFSET ROWS > ... FETCH ROWS", et al? That is not the same as an optimizer hint. An optimizer hint for FIRST (or FIRST n ROWS) indicates that you don't need all rows at once, because you retrieve a row (or maybe a set of rows) from the open cursor, do some processing and then retrieve the next row (or set of rows), etc. This can increase throughput because while my application is processing the row(s), the server might continue to fill the cursor; instead of the application having to wait until the server has materialized the entire result set. > I believe that gives the optimizer everything it could want to know. > > My experience over 30 years is that giving the optimizer hints generally > halts improvements to the optimizer. Depending on the optimizer to > optimize is the only motivation to improve it. Building in optimizer > hints generally means you've thrown in the towel. Sometimes it is not about optimizing the server side, but optimizing for how the client will actually process the rows. And sometimes you don't need all rows, but you also don't know in advance how many rows you will need (the stop condition might depend on a specific value, or on checks with a different sub-system). Being able to say 'optimize for retrieving the first x rows' allows the server to select an execution plan that might not be the most efficient for retrieving all rows (at once), but is better from performance or throughput of the client. Mark -- Mark Rotteveel -- Rapidly troubleshoot problems before they affect your business. Most IT organizations don't have a clear picture of how application performance affects their revenue. With AppDynamics, you get 100% visibility into your Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro! http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel
Re: [Firebird-devel] Some aspects of the optimizer hints
On 2-1-2014 20:50, Dmitry Yemanov wrote: > 02.01.2014 21:43, Mark Rotteveel wrote: > > >> It would be interesting to know which is better for performance, given >> isc_dsql_fetch, a FIRST (x) ROWS might perform better when small fetch >> sizes are used. > > What do you mean by "small fetch sizes"? If it's about incomplete fetch, > i.e. only few rows are fetched and then the cursor is closed, then your > assumption is likely to be correct. That as well, but what I meant is the use case where isc_dsql_fetch is used with a small fetch size in comparison toe the entire result set. I assume the current optimization is: Client: execute query Server materializes all rows Client: fetch size=1 (wait until all rows are materialized) Server: returns row 1 Client: fetch size=1 Server: returns row 2 ... With a hint it could work like: Client: execute query optimize for first row Server materializes 1 row Client: fetch size=1 Server: returns row 1 (and continues materializing all rows) Client: fetch size=1 Server: returns row 2 ... >> I'd actually prefer comments like Oracle does. I think it is better for >> portability. > > Given e.g. FIRST vs TOP vs ROW_NUMBER mess developed by different > vendors, I wouldn't care much about cross-database portability. Hints > are outside the SQL standard, but many other features are not there > either. I hope you don't suggest to implement everything non-standard in > the comments, do you? No, but I think optimizer hints are not part of the query, but a form of metadata, and having it as part of the query syntax feels 'wrong' somehow. > SQL is a declarative language, so let's allow users to declare what they > need using the language itself. If it needs to be part of the query syntax, I'd prefer something similar to SQL Servers OPTION-clause: http://msdn.microsoft.com/en-us/library/ms190322.aspx and http://msdn.microsoft.com/en-us/library/ms181714.aspx To me it seems to be more extensible, and might also be easier for the parser (especially if more options are added), and - with some changes - the current PLAN syntax could be integrated into that as well. >> If we go with comments, I'd suggest that throwing exceptions for hints >> should be optional (for portability), maybe using a dpb item to turn it >> off (default on), or a server- or database specific config option. > > Comments throwing exceptions from inside is not the feature I'm going to > be an author of, sorry ;-) A warning that the optimizer hint was ignored because it has a syntax error then :P Mark -- Mark Rotteveel -- Rapidly troubleshoot problems before they affect your business. Most IT organizations don't have a clear picture of how application performance affects their revenue. With AppDynamics, you get 100% visibility into your Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro! http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel
[Firebird-devel] [FB-Tracker] Created: (CORE-4312) I use the WIN1258 charset but firebird can not store Vietnamese character. It displays the "?" character.
I use the WIN1258 charset but firebird can not store Vietnamese character. It displays the "?" character. - Key: CORE-4312 URL: http://tracker.firebirdsql.org/browse/CORE-4312 Project: Firebird Core Issue Type: Bug Components: Charsets/Collation Affects Versions: 2.5.2 Update 1 Environment: Windows 7 64 bit, firebird 2.5.2 Reporter: Quân Phạm Trường Firebird can not store Vietnamese characters. Although I use the WIN1258 charset, it still display "?" character. What 's wrong? -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://tracker.firebirdsql.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira -- Rapidly troubleshoot problems before they affect your business. Most IT organizations don't have a clear picture of how application performance affects their revenue. With AppDynamics, you get 100% visibility into your Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro! http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel
Re: [Firebird-devel] Some aspects of the optimizer hints
On Fri, Jan 3, 2014 at 5:26 AM, Mark Rotteveel wrote: > > > ...case where isc_dsql_fetch is > used with a small fetch size in comparison toe the entire result set. > > I assume the current optimization is: > Client: execute query > Server materializes all rows > Client: fetch size=1 > (wait until all rows are materialized) > Server: returns row 1 > Client: fetch size=1 > Server: returns row 2 > For the sake of the naive following this discussion, Mark's assessment of the operation of the Firebird runtime is not general. He's correct about the plan created by the optimizer when there is an ORDER BY clause without any syntactic restriction on the size of the result (e.g. no FIRST clause, no ROWS clause, etc.) Without an ORDER BY, Firebird returns enough data to fill the fetch buffer, returns the buffer and begins gathering more rows. With an ORDER BY and a restriction on the number of rows retrieved and an index that can be used to emulate the sort required to order the results, Firebird returns enough data to fill the fetch buffer, returns the buffer, and begins gathering more rows. Only the case of an ORDER BY that doesn't specify a limit on the number of rows or that cannot be emulated by following an index, does Firebird assemble the whole result before returning data to the client. Obviously, at least to me, if you've got to sort the data, you have to read all of it. Furthermore, despite the everyone's instinct, it's a good deal faster in the general case to read a table in an optimal order and sort the data in memory that to read the data in index order - random order relative to storage. Good luck, Ann -- Rapidly troubleshoot problems before they affect your business. Most IT organizations don't have a clear picture of how application performance affects their revenue. With AppDynamics, you get 100% visibility into your Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro! http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrkFirebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel