Part of Database drivers: the hub. 121 entries under this heading; every entry opens as its own topic.
- A PROP:SQL query on a dummy table takes 95 seconds; the same statement takes 6 in Management Studio (Reported, not reproduced) - ORDER BY was most of it; compare execution plans from Profiler.
- Intermittent Errorcode 90 opening a /turbosql dummy table used for PROP:SQL (Reported, not reproduced) - read FILEERROR(), not ERROR().
- PostgreSQL: how do I see the server's SQL error message after a file error? - FILEERRORCODE() and FILEERROR(); the ABC Try methods.
- PROP:SQL with only a WHERE clause works on MySQL but returns different rows on Firebird - PROP:SQL is a full statement; PROP:WHERE carries a fragment.
- MySQL from Clarion: can I keep using SET/NEXT/ADD/PUT, or must I learn SQL first? - the driver generates the SQL; PROP:SQL for set-based work.
- Reading a browse's generated SELECT in the trace: question marks, a duplicated WHERE and DESC on every ORDER BY column - parameter markers, range + filter, a backwards page read.
- MSSQL: what BUFFER page size speeds up an ABC browse? - index first, then raise the page size from 20 into the low hundreds.
- MSSQL: PUT() inside a SET/NEXT loop makes the loop read the same rows twice (Reported, not reproduced) - set-based UPDATE through PROP:SQL instead.
- Firebird: a stored procedure on a second database answers in milliseconds, but every NEXT() on the dummy table takes a second (Reported, not reproduced) - a VIEW with a large BUFFER over an imported table of the second database.
- Firebird: adding "ROWS 1000" to a browse through SQL() in the filter gives "Token unknown" (Reported, not reproduced) - the filter lands inside the WHERE.
- PostgreSQL: an invoice-history query with GROUP BY over a million-row table takes 20 seconds - a partial covering index, or the customer id on the invoice.
- PostgreSQL: a year-by-month summary, and crosstab() saying relation "..." does not exist on a CTE - GROUP BY on the server; the CTE goes inside the crosstab string.
- Keeping lookup tables in TPS while the main data moves to SQL - a mixed-driver VIEW joins on the client; In-Memory or QUEUE lookups.
- Calling SQLSetEnvAttr from Clarion always returns -1 (SQL_ERROR) - pass the value, not ADDRESS(); SQLRETURN is a SHORT.
- Clarion 6.3 build 9058: GPF inside the SQL driver on Close() when a form is opened a second time (Reported, not reproduced) - BLOB tables down the relation chain; 2008 beta builds.
- New to SQL: what changes when a Clarion program uses Microsoft SQL Server, and where to learn - sets instead of records; the file commands still work, PROP:SQL for the rest.
- Getting the rows of a SELECT: PROP:SQL, NEXT, and when to use a Clarion VIEW instead - declare the first columns to match the SELECT, then NEXT in a loop.
- SQL Server: a CHOOSE-style test inside a SUM (use the discounted amount when it is not NULL) - a CASE expression inside the aggregate.
- PROP:SQL with a subquery column takes minutes and the column comes back as zeros (Reported, not reproduced) - read the trace to see what is sent; the thread did not settle it.
- SQL browse: filtering a parent browse on child fields shows each parent once per child - a server-side view with one row per parent is the first choice.
- MS SQL: running several statements, or a script, through PROP:SQL - osql against a script file, or a stored procedure.
- Turning on the SQL driver trace from code, without the Trace utility or win.ini - SEND with /LOGFILE=, PROP:Profile, PROP:Details and PROP:LogSQL.
- SQL Server view with a LEFT OUTER JOIN: error 10113 when indexing it, and is it slow without an index? - index the underlying tables; the view uses what the same SELECT would use; read the execution plan.
- MSSQL driver: error 78 when a browse opens the update form, on one customer's machine only (Reported, not reproduced) - run Trace.exe on that machine before it recurs; one poster saw every error 78 come from the ABC browse code (page load, totalling).
- PROP:SQL result set comes back empty after upgrading to build 9055: a SET() on the file after the statement - remove the SET(); it clears the PROP:SQL statement, and build 9055 honours that.
- How to see the SQL that Clarion generates for PostgreSQL (PROP:LogSQL output looks like gibberish) - it is the trace output; Trace.exe with the Clarion-statement options is easier to read.
- A browse's SELECT in the trace lists all the table's fields, not only the browse columns - the first lines may be the schema check; the VIEW's PROJECT list defines what comes back; the log and the server view disagreed.
- ABC FileManager passed to a procedure: the program GPFs on fm.UseFile (Reported, not reproduced) - the thread showed a similar procedure that opens the file through the manager and tests with a dummy PROP:SQL; no cause was found.
- MSSQL: Relate:File.DELETE or DELETE(File) for speed, and what actually made the app faster - both calls work; do the referential integrity in the database with a trigger; no speed difference was measured.
- Update form with tabs: showing the number of child records on each tab before the user opens it - ActiveInvisible = True on the child browses, file-load them, then RECORDS() of each browse queue.
- PostgreSQL: an UPDATE with a WITH ... AS clause fails with ERROR: column "v1" does not exist - a WITH name is a result set, not a scalar; write the SELECT first and split the work into simpler UPDATEs.
- MSSQL: connection busy S1000 on an update form although BUSYHANDLING = 2 is set (the poster's cause was his own PROP:SQL updates) - the poster's cause was his own PROP:SQL updates; set BUSYHANDLING on the first table opened on the connection.
- PostgreSQL: a browse over three related tables takes up to two minutes to refresh (Reported, not reproduced) -
/NESTING = TRUE(join on the server) and hot key fields were suggested; no result was posted. - PostgreSQL: the child browse shows wrong and duplicate records after opening the update form - filter the child browse and reset it on a parent field instead of relying on the relation controls.
- PostgreSQL: making an Excel or CSV file directly from the server - the server's COPY command, or
\copyfrom psql, writes a CSV file. - A "starts with" browse filter built from >= 'Taz' and < 'Ta{' returns no record on SQL Server but works on Oracle - filter with
LIKE 'Taz%'wrapped inSQL(...)instead of building an upper bound; the cause of the missing row was not settled. - After converting from TPS to MSSQL, one procedure takes 7 seconds per scan instead of 1 - run SQL Profiler, feed the trace to the Database Engine Tuning Advisor and apply its index changes; 7 seconds fell to under one.
- MSSQL: a SELECT returns 87 rows but the UPDATE with the same WHERE says 267 rows affected - a trigger on the table touched more rows; disabling it explained the count.
- MSSQL: BUFFER(file, 2) or more gives a file system error on NEXT when a /TURBOSQL field is shorter than the column - make the declared field at least as long as the server column, or cut the value in the SELECT; the bulk fetch needs the exact record size.
- After code changes the data behind a browse, ODBC does not redisplay it (it did with TPS) - call
BRW2.ResetQueue(RESET:Done)after the code changes the data. - Parameterized queries: SQLBindParameter before PROP:SQL is ignored; PROP:SQLRowSet took parameters - use PROP:SQLRowSet, which took parameters and several statements; PROP:SQL ignored SQLBindParameter.
- PostgreSQL: one row per invoice that lists the count of items per price (string_agg is slow as a subquery) - the cost was a subquery run once per invoice; count by price first in a CTE, then aggregate with string_agg in one pass (55 seconds to under one).
- Process procedure on a PostgreSQL table: error 33 "record not available" on Access:Items.Update (Reported, not reproduced) - a Process expects PUT(View); REGET(View,POSITION(View)) at the start lets Access:File.Update work; no result was posted.
- PostgreSQL: a view with two or more LEFT OUTER JOINs is very slow (UseDeclareFetch) - add
useDeclareFetch = 1to the connection string;/Nesting=Truewas the other suggestion. - File drop combo on MSSQL: the More Field Assignments do nothing - the VIEW must project the assigned fields; add them to the list box with width 0 (it worked for the poster), or use hot fields with "Not In View" unchecked.
- IP driver in front of a remote MySQL server: will it be faster than the ODBC driver? - expect no gain: the IP driver sits in front of the same ODBC driver and only adds a layer; it helps only if the slow leg is the long one.
- MySQL through ODBC: a browse over more than two related files sends many queries instead of one join - two one-to-many children multiply the rows, so Clarion builds the view on the client; use a browse per child, a server view, or set PROP:Alias.
- A SQL error box appears when a table is filtered (SQL Server Express 2005): finding the SELECT that failed (Reported, not reproduced) - turn the trace on or set
file{PROP:Details}=1andfile{PROP:Profile}to a log file to see the generated SELECT; a small SQLError procedure can copy the query to the clipboard. - SQL: making room between sort-order numbers with one UPDATE (Reported, not reproduced) - one UPDATE such as
mysortorder = mysortorder * 5changes all rows as a set, so a unique constraint is not hit row by row as in a SET/NEXT/PUT loop; no outcome was posted. - MSSQL: PROP:SQLFilter gives "The multipart identifier could not be bound" or "Ambiguous column name" - the generated SELECT uses aliases A, B and so on; set
Buchungen{prop:alias} = 'A'before the view is used and name that alias in PROP:SQLFilter. - PostgreSQL: a failing PROP:SQL statement on a dummy file never gives errorcode 90 - ERRORCODE() is always 33 - remove the NEXT: after a statement that returns no rows it returns 33 and masks the 90; test ERRORCODE() right after the PROP:SQL assignment.
- MSSQL: a LIKE condition in a view's PROP:Filter is ignored; use SQL() or PROP:SQLFilter - wrap the text in SQL() so the driver sends it as written; the poster confirmed it works.
- MySQL: several ; separated statements in one PROP:SQL do not run (a stored procedure was the way the thread leaned) - a plain query call does not switch on multiple statements; put them in a stored procedure and call it.
- MS SQL: an occasional "Invalid object name" error on one table that exists - run trace.exe and check whether the statement went to another database; check the quoting; fully qualify the table name.
- A NEXT loop with PROP:WHERE on a SQL file returns nothing, ERRORCODE 33 "record unavailable" - use SET(key) alone with the WHERE, check NULL against 0 and quote the values; if nothing returns, remove one filter at a time and use trace.exe.
- PostgreSQL: PROP:SQL with a WITH (common table expression) query returns error 33 "no records found" - move the query into a stored function and call it; one post says C9 and later accept CTEs through PROP:SQLRowSet.
- PostgreSQL: a browse on a 295,000-record table waits 7 to 10 seconds before it shows anything - add
UseDeclareFetch=1to the ODBC connection string so the server starts sending before the set is complete; it worked for the poster in the data source configuration. - MSSQL: browse boxes became sluggish after the database grew from 10 GB to 20 GB - add server indexes that match the slow browse's key, filter and order, found with SQL Profiler and added one at a time; not every dictionary key needs a server index.
- MSSQL: LIKE has no "repeat 0-n times" - matching name, any non-alphanumeric characters, surname - combine
LIKE 'john[^A-Z0-9]%smith'with aNOT LIKEthat rejects letters or digits in between; the poster tested it on sample rows. - ODBC (Firebird): INLIST or INSTRING in a filter is ignored and the generated SELECT has no WHERE clause - the driver cannot translate those statements, so the client evaluates them; write the condition in SQL inside
SQL(...). - ODBC, SQL Server: PROP:SQL "select count(...)" returns garbage characters in a STRING field (use a CSTRING) - declare the receiving fields as CSTRING (256 worked) and drop the CAST; a STRING takes the raw bytes the backend sends.
- Reading a code and description from a SQL table in another database when its structure may change - three answers: a server VIEW, a dynamic query through PROP:SQL into a generic two-field table, or a VIEW with a BUFFER.
- PostgreSQL: a read, add and update loop stops at record 201 with 284 records, fixed by a later ODBC driver release - two other posters ran the test without trouble; the poster confirmed the fault belonged to one ODBC driver release and a later one cured it.
- MSSQL: FILEERROR() shows a generic error instead of the server's RAISERROR text when SQL Native Client is installed - an earlier thread said the blind messages came only where SQL Native Client was installed; run on a machine without it, or uninstall it temporarily, and the real message appears.
- MSSQL: emptying a whole table from the program with PROP:SQL (DELETE FROM or TRUNCATE TABLE) -
Adreport{prop:SQL}='Delete from Adreport'worked for the poster; TRUNCATE TABLE is faster because the deletions are not logged. - Tuning an ABC application ported from TPS to SQL over ODBC: ranges to filters, and date range limits on a browse - change range checks to filters so the WHERE clause does the work; HandyTools page-loaded related browses made the display instant for one poster.
- ODBC /TURBOSQL dummy table for PROP:SQL returns nothing unless the table exists on the backend (Firebird) - the poster's cause was a leading space in the driver string (
' /TURBOSQL=True'); with the flag right the dummy table need not exist on the backend. - SQL browse over several tables: where to put a PROP:SQL lookup for each row, and which locator to use - import a server view like a file, or put the PROP:SQL call in the browse's SetQueueRecord method; add related tables to the file schematic instead if you can; ENTRY or FILTERED locators suit SQL.
- SQL app: how to show the user that a browse or form is still loading (busy cursor or splash window) - a busy cursor with a status bar message, or a splash procedure that gets EVENT:Close when the connection is up; the poster chose the cursor.
- Filling an ABC browse from a stored SQL procedure: use a queue - a template browse cannot read a stored procedure; load the result set into a queue and show the queue, keeping it small with filters.
- Emptying a VIEW before reuse: CLOSE and OPEN it, and PROJECT every field you use (PostgreSQL) - CLOSE and OPEN the VIEW, or clear each file's record as the ViewManager does; only PROJECTed fields come back in SQL.
- Moving from TPS to a SQL backend: when to open tables, where PROP:BusyHandling goes, multi-paragraph memo export truncated (Reported, not reproduced) - set BusyHandling before any connection is made; LazyOpen was one view on opening tables; the memo export truncation got no answer.
- MySQL through ODBC: updating a table from a TPS file; "record not available" on PUT in a process - declare the primary key, make the key fields hot fields in the Process, find the record with GET and test ERRORCODE() before PUT.
- MSSQL: error 80 (unsupported driver function) on a PUT; how to find the cause (Reported, not reproduced) - read FileError() right after the PUT or use a trace; GET the record before the PUT; no cause was found.
- Firebird: a Process that takes 2 minutes on TPS takes 3 hours after the move, and what the posters advised - time the Process without your code, add BUFFER, replace per-record calls with PROP:SQL or a stored procedure; the ODBC NoWait button raised the speed for the poster.
- MS SQL: the application GPFs after writing to a table that has a trigger (Reported, not reproduced) - an ODBC driver bug was suspected without proof and a GPF reporter tool was suggested; the LOGOUT question went unanswered.
- PostgreSQL: WHERE on a column alias fails with "alias_name does not exist" (use a subselect, WITH or a join) - an alias cannot be used in the WHERE of the same select; filter on the real expression, wrap a subselect, use a WITH query (the poster's choice) or a LEFT JOIN on a grouped subselect.
- PostgreSQL: dynamic column titles from a function that returns a table (Reported, not reproduced) - read as a pivot problem with the crosstab function as the starting point; a guess borrowed from another SQL dialect did not apply; no answer was settled.
- MySQL: an ABC browse with two joined files loses its records under SetFilter (use a MySQL view) - create a view on the server for each complex browse, import it as a table and base the browse on it; the browse was fast and SetFilter worked.
- Firebird: PROP:SQLOrder on a sortheader browse gives duplicate rows (Reported, not reproduced) - a file-loaded browse and putting the sort in ApplyOrder helped other posters; the original poster still got duplicates though the SQL ran correctly in IBExpert.
- MSSQL: an UPDATE with a join sets PAID on every row of the table - remove the CROSS JOIN - the CROSS JOIN made a Cartesian product so every row qualified; keep the INNER JOIN and WHERE, or test with a count subquery in the WHERE.
- MSSQL: error 78 "Invalid number of parameters" with "Size not equal for key" in the trace log (Reported, not reproduced) - the error vanished for the poster when the browse Totaling was removed or the key dropped; one poster pointed at the driver with more than one key; no cause was settled.
- MSSQL: "Record Retrieval Error" when the update form returns and the browse refreshes (Reported, not reproduced) - the POSITION() return string in the ABC classes, a bad connection and a ResetFromFile() after ResetFromView() were the leads; the poster did not say what cured it.
- MSSQL: a PROP:SQL query returns nothing in the app but works in Query Analyzer (double quotes around a string value) - put string values in single quotes (
<39>inside a Clarion literal); test ERRORCODE() after the PROP:SQL assignment and each NEXT. - MSSQL: concatenating TEXT columns in an UPDATE stops at 8000 characters (use UPDATETEXT to append) - one UPDATETEXT statement per source column: offset 0 and delete length NULL in the first, both NULL in the rest to append.
- A stored procedure through PROP:SQL returns in milliseconds but the same script in the admin tool takes much longer - MS SQL may hand back the first part of the result set and load the rest on another thread; compare the same result set on both sides before looking for a fault.
- MySQL: copying a whole table to a remote server with PROP:SQL "INSERT INTO ... SELECT" does not run when the tables are on different servers - an INSERT ... SELECT runs on one server only; export with INTO OUTFILE and load with LOAD DATA LOCAL INFILE, both through PROP:SQL.
- MySQL through ODBC: ABC browses on a 200,000-record table are slow, PREVIOUS and PrimeRecord take seconds (Reported, not reproduced) - view filters, case-sensitive keys, a trace and an older ODBC driver release were suggested; MS SQL browses were fast for two posters; no cause was found.
- Firebird: "BIND has not been called for (1101)" when a browse uses an alias file (check the filter for a reserved word) - Trace.exe named the field with no BIND; it was a Firebird reserved word still used in the filter; renaming it cured the error.
- Firebird: a LIKE filter on a process or browse without PROP:SQLFilter, and making it case-insensitive - wrap the SQL in SQL() inside the normal filter; for case-insensitive matching use CONTAINING (the poster's choice) or upper() on both sides.
- PostgreSQL: converting a TPS file with large blobs to PostgreSQL through ODBC is painfully slow (Reported, not reproduced) - posters offered a hand-coded SET/NEXT loop with no indexes until after the load, UseDeclareFetch=1, loading a CSV with COPY, or keeping files in a folder; nothing was measured.
- SQL browse over a parent and a child table returns the parent row once per matching child: how to get distinct rows - an EXISTS subquery on the child table inside the filter worked for the poster; DISTINCT on the first view field of the SQL Advanced tab was the alternative.
- MSSQL: the application is very slow at one client; check the log file and recovery model, keys, user count and the free edition - check SIMPLE or FULL recovery and the log size, table sizes, missing keys, the user count and the free edition's governor, and watch the queries in SQL Profiler.
- Getting the value of a SQL scalar function into Clarion: the CALL form fails on MS SQL; SELECT it with a CAST through PROP:SQL - drop CALL for a function on MS SQL, select it through PROP:SQL into a dummy table and CAST the result, which made the value arrive.
- MSSQL: copying records from one table to a table in another database on another server - Use a second connection variable and PROP:SQL or Clarion adds in a process, a queue copy, a stored procedure or a trigger; one table cannot switch servers.
- MS SQL: PROP:SQL SELECT returns only "Record Not Available" - a USE statement in the same string breaks it - PROP:SQL takes one statement at a time; remove the USE statement or send it as its own call, and check ERRORCODE after OPEN and PROP:SQL.
- Firebird: searching and locating without case sensitivity needs a case-insensitive collation - Firebird has no case-insensitive switch; build or install a case-insensitive collation (one poster used the IBCollate drivers on Firebird 1.0) and read the collation page he linked.
- Firebird: an Access-style crosstab (pivot) query from a Clarion program (Reported, not reproduced) - A commercial crosstab wizard and an Oracle pivot page were suggested; nobody gave a Firebird statement and the asker reported no outcome.
- MS SQL Server: duplicating a record without specifying each field and value (Reported, not reproduced) - A Fetch of the record then an Insert with the key cleared avoids listing fields; no plain SQL statement for copying a row was offered, and a unique key is needed.
- MSSQL 2005: a Missing Indexes report lists an index again after the service restarts, although the index exists (Reported, not reproduced) - The thread did not explain why the suggestion returned; it covers covering indexes, taking the database offline instead of stopping the service, and comparing the include lists.
- MSSQL and an ABC Browse: using fields in the browse queue that are not shown in the list box - Add the fields to the browse's Hot Fields list, or add a browse join; reading other tables per row in SetQueueRecord costs a query per row.
- PROP:SQL with SELECT COUNT(*): where does the result end up? - The result row fills the buffer of the file named in PROP:SQL from its first field, so a LONG or CSTRING there receives the count; no server table is needed.
- MS SQL after leaving TPS: can BUFFER be set once for all files, and what else speeds up a legacy app? - No global BUFFER setting is known; set the buffer in a helper procedure that sends PROP:SQL, and prefer set operations or stored procedures to row loops.
- SQL Server: the equivalent of the Clarion FORMAT function to pad a number with leading zeros in an UPDATE - No direct FORMAT in SQL Server; STR, LTRIM, SPACE and REPLACE of spaces by zeros padded the number inside one UPDATE for the poster.
- PROP:SqlJoinExpression set in code has no effect on the browse; which embed works - A runtime join expression set on the browse view had no effect in several embeds; putting it in the browse Reset method right after the parent call worked for the poster.
- PROP:SQLFilter gives errors on a local variable: concatenate the value and prefix the table alias - PROP:SQLFilter goes to the server as the WHERE clause, so concatenate the variable's value into the string and prefix the column with the table alias a. or b.
- MS SQL: DUPLICATE does not work correctly unless GET(File,0) comes first - On MS SQL, call GET(File,0) before DUPLICATE; the Help text saying GET with a file pointer is unsupported is slightly wrong for that case.
- MSSQL list box: hot fields do not update unless added to the list with length 0 (clear "Not in View") - Clear the Not in View checkbox on the hot fields; a field outside the view is not selected from the database, so it cannot refresh.
- MSSQL: "Function sequence error" on .Update() and .Fetch() a few times a month (Reported, not reproduced) - Function sequence error on Update and Fetch; leads were a PROP:SQL NEXT that left rows unread, and BINDCOLORDER, BINDCONSTANTS or ODBC tracing; no outcome posted.
- MySQL ODBC: a PROP:SQL insert fails with 07001 "SQLBindParameter not used for all parameters" when a value holds a question mark (Reported, not reproduced) - A PROP:SQL insert into MySQL failed with 07001 when a value held a question mark; BINDCOLORDER and the ODBC API were suggested, with no outcome posted.
- MySQL over a fibre internet line is much slower than on the LAN: look for SET/NEXT calls in frequently run code - MySQL over a fibre line was slow because a routine in the event code did a SET and NEXT on four configuration files; the poster found that cause himself.
- Running a complex procedure on each record when moving to SQL: keep it client-side or move it into a stored procedure - Keep a complex per-record procedure client-side, or move the whole select-and-update into a stored procedure; queues and cursors were other options.
- MSSQL: PROP:SQL with a SELECT, then changes in a loop - what is updated, and why SET() after PROP:SQL clears the query - Do not SET() after PROP:SQL, it clears the query; use one PROP:SQL UPDATE, or a VIEW with a filter and update through the view.
- PostgreSQL: a table with 300,000 rows and 7 indexes gets slower to open and update as it grows (Reported, not reproduced) - Partitioning, a full vacuum and analyse, and UseDeclareFetch=1 were suggested for a slowing 300,000-row table; the poster still saw the problem and no cause was found.
- ODBC: changing the table alias Clarion generates in its SELECT statements (PROP:Alias) - Set PROP:Alias on each file after it opens and on each thread; a global extension or File Manager Init embed can apply the prefix to all tables.
- MSSQL: updating a row with fields from the previous record of the same table (T-SQL) - A lookup function on the table being updated shares its buffer, so use an ALIAS or a dummy table; the T-SQL LAG function was not in SQL Server then.
- Converting a TPS loop that calculates fields from other fields of the same record into a SQL UPDATE - Replace the Clarion loop with an UPDATE referring to the row's other columns, or use computed columns, or move the array into a child table.
- Remote MS SQL (2005 Express) too slow over an IP address: how to find out why, starting with a simple keyed browse - No fix was posted for a slow remote SQL Express link: the line speed caps it, keyed access runs on the server, and a plain page-loaded unique-key browse is the test.
- PostgreSQL through ODBC: 400-500% slower than MS SQL, memory grows, and "Record changed by another station" (UseDeclareFetch, LFConversion) - For slow PostgreSQL over ODBC add UseDeclareFetch=1 to the connection string; LFConversion=0 stopped the Record changed by another station message.
- ABC browse with a parent and child file: parent columns empty after the first child row (JoinType=MSSQL helped the poster) - A Clarion view joins as a left outer join by default; if parent columns come back empty, re-create the browse, or the poster set the driver option /JoinType=MSSQL, losing nested joins.
- SQL browse fetches far more data than one page needs after moving from TPS: SQL filter and order, and hot fields - Move browse filters and orders to the server with PROP:SQLFilter and PROP:SQLOrder in ApplyFilter and ApplyOrder, and use hot fields to choose fetched columns.